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.