Module: Fortress::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/fortress/controller.rb
Overview
The Controller module embbed all the code to “hook” Fortress to your Rails application.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#access_deny ⇒ Object
Default access_deny method used when not re-defined in the Rails application.
- #prevent_access! ⇒ Object
Instance Method Details
#access_deny ⇒ Object
Default access_deny method used when not re-defined in the Rails application.
You can re-define it within the ApplicationController of you rails application.
31 32 33 34 35 36 37 |
# File 'lib/fortress/controller.rb', line 31 def access_deny respond_to do |format| format.html { } format.json { (:json) } format.xml { (:xml) } end end |
#prevent_access! ⇒ Object
20 21 22 23 |
# File 'lib/fortress/controller.rb', line 20 def prevent_access! controller = Fortress::ControllerInterface.new(self) Mechanism.(controller, action_name) ? true : access_deny end |