Displaying 1 result from an estimated 1 matches for "find_or_nil".
2006 Apr 10
5
ActiveRecord: Behavior not doumented
Hello everbody, doing a
#find(:first,an_id)
with Rails 1.1.0 I expected that find returns the record which id mathches the
given parameter an_id or nil if it couldn''t be found.
This behaviour is documented on api.rubyonrails.org.
But the find returns the first available object and not nil if an_id is not in
the db. Is the doc on rubyonrails.org out of sync?
Greetings,
--
Daniel