-
-
Save ValeriiVasin/1612209 to your computer and use it in GitHub Desktop.
Rails 3 reset session using devise (actually not using devise)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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