Created
May 30, 2012 20:17
-
-
Save Heavyblade/2838666 to your computer and use it in GitHub Desktop.
This file contains 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
def ensure_admin | |
redirect_to '/wait_for_approval' and return unless current_user.approved? | |
redirect_to '/' unless current_user.admin? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment