Last active
December 25, 2015 07:18
-
-
Save piersadrian/6937864 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
module SessionsHelper | |
... | |
def authenticate! | |
raise ActionController::RoutingError.new("Unauthorized") unless signed_in? | |
end | |
end | |
class SomeController | |
before_action :authenticate! | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment