I am currently learning Rails 3 and have some doubts regarding sessions and RESTful authentication, hope you can help me.
By default, Rails stores session information using cookies. That means that if I do session[:user_id] = @user.id , it is stored in a cookie automatically, so that's all I have to do.
When I use ActiveRecord store, instead, we use the database for storing session information.
The book I am following, explains together the ActiveRecord store for sessions and the RESTful authentication, so I'm afraid I have mixed up some concepts.
My doubt is: When using ActiveRecord storage for sessions, is this just like using the cookie option, but with Rails automatically storing it in the database? I mean, woul I still use it just like session[:user_id] = @user.id and would Rails take care of storing it into the database?
If so, declaring sessions as a Resource, would be independent from using ActiveRecord store, wouldn't it?
I understand that, without declaring Sessions as a resource, I wouldn't have RESTful authentication, but the book uses ActiveRecord store, and next, declares Sessions as a resource, and I don't know if those are independent.
Hope I have explained myself
Thanks for your responses!