E. Litwin wrote:
> Just to clarify - are you setting session[:user_id] in the user.login!
> (session) call?
> The other suggestions on handling a nil session[:user_id] (i.e. using
> find_by_id) are the appropriate ways to handle the error.
>
> Eric
>
> On Apr 30, 12:09�pm, Stephen Fagan <[email protected]>
Yes,
#log a user in
def login!(session)
session[:user_id] = self.id
end
Steve
--
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
-~----------~----~----~----~------~----~------~--~---