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.

RSL's latest activity

Monday, January 04 2010
3651 Make escape_javascript helper a little more duck friendly was created in Ruby on Rails
  • RSL
    RSL created the ticket at 6:00 PM

    Updated method to use to_s instead of raising exception when passed a numeric argument. Existing code handled nil in similar manner and as we Rubyists usually a...

Wednesday, March 18 2009
2228 ActiveRecord::Base#saved? was updated in Ruby on Rails
Monday, March 09 2009
2089 Add AR::Base#just_created? to differentiate records was updated in Ruby on Rails
  • RSL
    RSL commented at 3:09 PM

    Updated patch per Pratik

Thursday, February 26 2009
2086 [PATCH] Primary key on HABTM join table now raises an exception was updated in Ruby on Rails
  • RSL
    RSL commented at 11:37 PM

    Looks like a good well thought-out patch to me. Passes tests, seems like an elegant solution. +1 from me.

2089 Add AR::Base#just_created? to differentiate records was updated in Ruby on Rails
  • RSL
    RSL commented at 11:26 PM

    To clarify the benefit of this over writing out the find_or_initialize song and dance mentioned above there are two cases where having a method to check would b...

  • RSL
    • Title changed from Add AR::Base#just_created? to differenciate records to Add AR::Base#just_created? to differentiate records
    by RSL at 11:03 PM
  • RSL
    RSL created the ticket at 10:58 PM

    I recently had a need to know if an record created using find_or_create was found or created. I got around it via find_or_initialize then creating a local varia...

Monday, September 15 2008
1027 Optimization to not hit the db when preloading empty association sets was updated in Ruby on Rails
  • RSL
    RSL commented at 7:16 PM

    Oops. Forgot the find that generated the SQL:

    @@@ User.first :include => :current_membership

    
    
  • RSL
    RSL commented at 7:15 PM

    Here's the case where I discovered this behavior:

    
    class User < ActiveRecord::Base
      has_many :memberships
      has_many :sites, :through => :memberships
      belon...
  • RSL
    RSL commented at 7:11 PM

    Optimized patch in preload_belongs_to_association method.