Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rails 3 reset session using devise (actually not using devise)
class ApplicationController < ActionController::Base
...
before_filter :save_or_clear_session
def save_or_clear_session
if controller_name.eql?('sessions') and action_name.eql?('destroy')
request.reset_session
flash[:notice] = "Signed out successfully."
end
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment