class Admin::ApplicationController < ActionController::Base
  layout 'admin'
  before_filter :admin_required
  protect_from_forgery # See ActionController::RequestForgeryProtection for details

  protected
    def admin_required
      authenticate_or_request_with_http_basic do |user_name, password|
        user_name == 'admin' && password == 'gobi'
      end if RAILS_ENV == 'production' || params[:admin_http]
    end
end