How to access session from Warden/Devise after_authentication callback in Rails?

Up vote 1 down vote favorite share g+ share fb share tw.

I'm trying to access the current session from Warden's after_authenticate callback (running underneath Devise) in Rails 3. At the top of my application controller I want to do something like: Warden::Manager. After_authentication do |user,auth,opts| user.

Associate_with_ids(session:pending_ids) end The ultimate goal is to take a list of record IDs that were stored in the session before sign up and associate them with the user model after sign in. Any help would be much appreciated. Ruby-on-rails session authentication devise warden link|improve this question asked Oct 6 '11 at 20:06Alex Dunae1189 75% accept rate.

You can access the session store via auth: Warden::Manager. After_authentication do |user,auth,opts| user. Associate_with_ids(auth.

Session:pending_ids) end.

You can also find the whole session from the auth. Raw_session.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions