-1 

I use find_by_id if I want nil, there's no need to change behaviour if it can be achieved using a different method.

Cheers,
Jamie van Dyke
Fear of Fish
http://www.fearoffish.co.uk

On 30 Aug 2006, at 20:30, Rick Olson 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


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

Reply via email to