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.

tf's latest activity

Tuesday, September 21 2010
2610 Module attribute throws NameError on second request (but not first) was updated in Ruby on Rails
  • tf
    • Importance changed from to
    by tf at 11:35 PM

    Wrapping the initializer code in a config.to_prepare block might also solve the problem.

Friday, January 30 2009
1815 Add or_if_blank to Object was updated in Ruby on Rails
  • tf
    tf commented at 11:41 AM

    If this functionality is not wanted - for whatever reason - I'd consider packaging it up as a gem. Still I have to agree that I do not see how try could be of a...

Thursday, January 29 2009
1815 [PATCH] Add or_if_blank to Object was updated in Ruby on Rails
  • tf
    tf commented at 12:33 PM

    The bumblebee is kind of cool. Still it does not cover slightly more complex cases:

    
    person.hometown.or_if_blank { person.address.town }
    

    Silly example. You ...

  • tf
    tf commented at 12:16 PM

    I really like the idea of adding lazy evaluation by passing a block. A little note in the docs can point out the difference between "? :" and or_if_blank.