I am using devise in a Rails 3 app.
I would like to update some attributes of a User on a successful sign in.
I am doing it the following way:
I added following code to application_controller.rb
def after_sign_in_path_for(user)
@user = current_user
@user.status = "online"
@user.save
root_path
end
Is it possible to have a different method for doing this and not using the method that is used for defining the after_sign_in_path ?
Thanks in advance!
You can do this with hooks to warden.