Created
November 15, 2015 09:02
-
-
Save dimasjt/18cf88057ee4ad8274d6 to your computer and use it in GitHub Desktop.
authenticate http basic
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
def authenticate | |
if Rails.env.staging? | |
authenticate_or_request_with_http_basic do |username, password| | |
username == 'username' && password == 'password' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment