> Isn't find_by_name handled in method missing? Could we add a check for > a bang at the end so: > > @tag.find_by_name # => doesn't throw if nil > @tag.find_by_name! # => throws with nil > > PDI
I prefer the bang approach to the :some_hash_key thing. In the past I've wanted: Whatever.find(:one, ...) which is like find first but throws for <> 1 rows.... But this seems like a nice middle ground. -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
