On 17 October 2011 08:53, Nikhil Goyal <[email protected]> wrote: > > > On Oct 16, 1:47 pm, Colin Law <[email protected]> wrote: > >> You could save it in the session. >> >> Colin > > Can you show me with a example, railsguide does not has very good > documentation on sessions. I do not understand, where to initialize > sessions and how to use.
I think http://guides.rubyonrails.org/action_controller_overview.html#session pretty much covers it. It is very simple as can be seen in the examples there. Just set a value in the session in the controller (something like session[:current_user_id] = user.id for example) and access it again in a later action. Initially at least you can just leave all the session config stuff at default and just go ahead and use it. Colin -- 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.

