Class: Rapidfire::ApplicationController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Rapidfire::ApplicationController
- Defined in:
- app/controllers/rapidfire/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
- #authenticate_administrator! ⇒ Object
-
#rapidfire_scoped ⇒ Object
Override prefixes to consider the scoped.
Instance Method Details
#authenticate_administrator! ⇒ Object
9 10 11 12 13 |
# File 'app/controllers/rapidfire/application_controller.rb', line 9 def authenticate_administrator! unless can_administer? raise Rapidfire::AccessDenied.new("cannot administer questions") end end |
#rapidfire_scoped ⇒ Object
Override prefixes to consider the scoped. for method current_user
17 18 19 20 21 22 23 |
# File 'app/controllers/rapidfire/application_controller.rb', line 17 def rapidfire_scoped if !defined?(super) :user else super end end |