Skip to content

Instantly share code, notes, and snippets.

@notblizzard
Created November 27, 2014 22:51
Show Gist options
  • Save notblizzard/54c524f04b521ad8dabc to your computer and use it in GitHub Desktop.
Save notblizzard/54c524f04b521ad8dabc to your computer and use it in GitHub Desktop.
def authenticate
authenticate_or_request_with_http_basic do |user, pass|
Admin.find_by(user: user).try(:authenticate, pass)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment