[Rails] Re: Object#id will be deprecated?

Marcel Molina Jr.
Tue, 28 Feb 2006 03:44:41 -0000

On Tue, Feb 28, 2006 at 04:40:54AM +0100, Joe wrote:
> The code that sets @current_member is:
>   @current_member = Member.find(:first, :conditions =>
''...'')
>
> So my guess is that a member wasn''t found, presumably false was
> returned, and then ''false.id'' was called. Hmm,
I''ll have to rethink this
> code...

If find(:first) doesn''t find a result it returns nil. So if you are in
development mode you should be getting an exception raised. If you are in
production mode you won''t get an exception.

marcel
--
Marcel Molina Jr. <marcel@vernix.org>