app/controllers/admin/base_controller.rb
class Admin::BaseController < ApplicationController
skip_before_filter :locate_user
before_filter :authenticate
protected
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == ENV['ADMIN_USERNAME'] && password == ENV['ADMIN_PASSWORD']
end
end
end