On 8/30/06, Rick Olson <[EMAIL PROTECTED]> wrote: > > -1 > > I count on the fact that find(id) raises an exception. If I'm looking > up a model by id and it's not there, there's usually a problem. The > raises RecordNotFound exception is a convenient hook to render a 404 > page. > > If you really want it to return nil, why not use find_by_id ? > > -- > Rick Olson > http://weblog.techno-weenie.net > http://mephistoblog.com > > > >
-1 I agree with Rick here. I count on find(id) throwing an exception. I use find_by_id(id) if I want it the other way. -- Zack Chandler http://depixelate.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
