Created
July 20, 2011 21:58
-
-
Save courtsimas/1096029 to your computer and use it in GitHub Desktop.
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
if resource.state_is?("suspended") | |
scoped = Devise::Mapping.find_scope!(resource) | |
Devise.sign_out_all_scopes ? sign_out : sign_out(scoped) | |
flash[:alert] = "You're suspended!" | |
redirect_to root_path and return | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment