class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection for details
+ before_filter :authenticate
# Scrub sensitive parameters from your log
# filter_parameter_logging :password
+
+ def authenticate
+ authenticate_or_request_with_http_basic do |user_name, password|
+ user_name == AppConfig.user_name && password == AppConfig.password
+ end
+ end
end