Guest User

Untitled

a guest
Nov 28th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class HomeController < ApplicationController
  2. before_filter :authenticate, except: [:index, :show]
  3.  
  4. def authenticate
  5. authenticate_or_request_with_http_basic('Auth!') do |username, password|
  6. username == "user" && password == "pass"
  7. end
  8. end
  9. end
Add Comment
Please, Sign In to add comment