Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ApplicationController < ActionController::Base
- def authenticate
- authenticate_or_request_with_http_basic do |user, password|
- user == USER_ID && password == PASSWORD
- end
- end
- end
- class ApiController < ApplicationController
- before_filter :authenticate
- def index
- ...
- end
- end
Add Comment
Please, Sign In to add comment