Advertisement
Guest User

Untitled

a guest
Jun 12th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.29 KB | None | 0 0
  1. class EmployeesController < ApplicationController
  2.   before_filter :authenticate
  3.  
  4.   # GET /employees
  5.   # GET /employees.xml
  6.   def index
  7.  
  8. ...
  9.  
  10.   def authenticate
  11.     authenticate_or_request_with_http_basic do |user.password|
  12.       user=="admin" && password=="geheim"
  13.     end
  14.   end
  15.  
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement