Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Álvaro Bautista's latest activity

Sunday, October 31 2010
3299 HashWithIndifferentAccess#merge should accept block just like Hash#merge was updated in Ruby on Rails
  • Álvaro Bautista
    Álvaro Bautista commented at 10:18 AM

    You're right, I didn't take that into account. Here it is a patch that does.

Tuesday, October 12 2010
5777 Rails 3 Session Cookies and Render Calls was updated in Ruby on Rails
Sunday, October 10 2010
5720 ActiveSupport::Benchmarkable.benchmark double-renders was updated in Ruby on Rails
  • Álvaro Bautista
    Álvaro Bautista commented at 11:27 PM

    I kind of found a workaround, it consists of wrapping the yield call with with_output_buffer:

    def wadus
      with_output_buffer { yield }
    end
    

    That implies that a...

  • Álvaro Bautista
    Álvaro Bautista commented at 7:45 PM

    I run your example and I got the same result.

    In fact, it seems to happen when yield is called within any helper method. For instance, having the following help...

5777 Rails 3 Session Cookies and Render Calls was updated in Ruby on Rails
  • Álvaro Bautista
    Álvaro Bautista commented at 10:31 AM

    I tried to reproduce it, but it works fine for me. Having the following action:

    def nothing
      session[:is_there] = "anything wrong?"
      render :nothing => true
    ...
Saturday, October 09 2010
5775 HashWithIndifferentAccess should override #store was updated in Ruby on Rails
  • Álvaro Bautista
    Álvaro Bautista commented at 7:00 PM

    My patch was, in fact, not needed.

    I'm sorry, I should have refreshed the ticket page before submitting.

  • Álvaro Bautista
    • Tag changed from activesupport, hashwithindifferentaccess, params, patched to activesupport, hashwithindifferentaccess, params
    by Álvaro Bautista at 6:54 PM

    I agree, since fetch is already overridden.

    It may not be needed, as it is quite straightforward, but I attach a patch for it anyway.

Saturday, September 11 2010
5344 #localtime fails for TimeWithZone-wrapped DateTimes was updated in Ruby on Rails
  • Álvaro Bautista
    • Tag changed from datetime, method_missing, timewithzone, timezone to datetime, method_missing, patch, timewithzone, timezone
    by Álvaro Bautista at 8:16 PM

    The ActiveSupport::TimeWithZone#localtime method is not covered by any test. It fails when calling getlocal on a DateTime instance. A quick (and simple) workaro...

Saturday, August 07 2010
5300 ActiveRecord before_save callback not working with update_attributes method was updated in Ruby on Rails
  • Álvaro Bautista
    Álvaro Bautista commented at 6:33 PM

    After a quick look at the AR source code it seems that skipping callbacks in this method is intentional:

    # Updates a single attribute and saves the record.  
    #...
Wednesday, August 04 2010
5300 ActiveRecord before_save callback not working with update_attributes method was updated in Ruby on Rails
  • Álvaro Bautista
    Álvaro Bautista commented at 9:47 PM

    I found out my mistake. The method that fails is update_attribute. So my previous diff didn't fail because I was using update_attributes.

    I attach the right pat...