typically once you are happy that the user is who they claim to be,
you do something like session[:user_id] = @user.id
Then on subsequent approaches you can do User.find(session[:user_id])
to get the logged in user. Often one uses a before_filter to restrict
access to the appropriate pages. There is a plugin
(acts_as_authenticated) that does most of this for you.
Fred
On 27 Oct 2007, at 03:58, Dl Lo wrote:
>
> Hello everyone,
>
> I was trying to create a website with many users and each user is
> entitled to view their account. How should I start? Cookies? Or
> unique sessions? Any leads or tips on making a professional site
> would
> be nice. Any roadblocks to consider? Thanks for your help.
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---