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 -~----------~----~----~----~------~----~------~--~---
