Skip to content

Instantly share code, notes, and snippets.

@dimasjt
Created November 15, 2015 09:02
Show Gist options
  • Save dimasjt/18cf88057ee4ad8274d6 to your computer and use it in GitHub Desktop.
Save dimasjt/18cf88057ee4ad8274d6 to your computer and use it in GitHub Desktop.
authenticate http basic
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