Module: Masks::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/masks/controller.rb
Overview
Helpers for interacting with Masks in Rails controllers.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#current_access ⇒ Masks::Access
Returns the mask for the request.
-
#current_actor ⇒ Masks::Actor
Returns the mask for the request.
-
#current_mask ⇒ Masks::Mask
Returns the mask for the request.
-
#masked_session ⇒ Masks::Session
Returns the current masks session for the request.
Instance Method Details
#current_access ⇒ Masks::Access
Returns the mask for the request.
95 96 97 |
# File 'app/controllers/concerns/masks/controller.rb', line 95 def current_access @current_access end |
#current_actor ⇒ Masks::Actor
Returns the mask for the request.
87 88 89 |
# File 'app/controllers/concerns/masks/controller.rb', line 87 def current_actor masked_session.actor end |
#current_mask ⇒ Masks::Mask
Returns the mask for the request.
79 80 81 |
# File 'app/controllers/concerns/masks/controller.rb', line 79 def current_mask masked_session.mask end |
#masked_session ⇒ Masks::Session
Returns the current masks session for the request.
71 72 73 |
# File 'app/controllers/concerns/masks/controller.rb', line 71 def masked_session @masked_session ||= request.env[Masks::Middleware::SESSION_KEY] end |