See the discussion on the ticket for a nice lazy evaluation feature using blocks.
-Tim On 29 Jan., 13:03, "[email protected]" <[email protected]> wrote: > On Jan 29, 11:56 am, stephen paul suarez <[email protected]> wrote: > > > how do you suggest to make it cater for fallbacks that doesn't necessarily > > belong to a method > > in the object? > > e.g.: > > > user.name.blank? ? user.name : "An arbitrary value" > > > --stephen > > BumbleBees are very versatile creatures. > And they return a nil if they can't find any flowers. > > >> user.bumblebee(:name) || "An arbitrary value" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
