Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module MyApplication
- class Application < Rails::Application
- config.to_prepare do
- Refinery::PagesController.class_eval do
- before_filter :require_auth, :only => [:show]
- def require_auth
- if params[:id] == 'secret-page'
- authenticate_or_request_with_http_basic('Administration') do |username, password|
- username == 'admin' && password == 'password'
- end
- end
- end
- protected :require_auth
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment