John Merlino wrote in post #969678:
> Hey all,
>
> I know that this:
>
> Called id for nil, which would mistakenly be 4 -- if you really wanted
> the id of nil, use object_id
>
> means that I have an instance variable that has not been initialized.

Well, it means that something tried to call nil.id .

> However, I'm a little confused as to what to do in a signup form for
> form_for:
>
[...]
> There is no @user and so interpreter throws the exception. However, what
> can I do in order to allow someone the opportunity to signin when using
> a form? Do I create a temporary blank user: @user = User.new?

That's one common way of doing it.  Almost every Rails tutorial does 
that at some point.

>
> Thanks for response.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sent from my iPhone

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to