Module: Masks::Controller

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/masks/controller.rb

Overview

Helpers for interacting with Masks in Rails controllers.

See Also:

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#current_accessMasks::Access

Returns the mask for the request.

Returns:



95
96
97
# File 'app/controllers/concerns/masks/controller.rb', line 95

def current_access
  @current_access
end

#current_actorMasks::Actor

Returns the mask for the request.

Returns:



87
88
89
# File 'app/controllers/concerns/masks/controller.rb', line 87

def current_actor
  masked_session.actor
end

#current_maskMasks::Mask

Returns the mask for the request.

Returns:



79
80
81
# File 'app/controllers/concerns/masks/controller.rb', line 79

def current_mask
  masked_session.mask
end

#masked_sessionMasks::Session

Returns the current masks session for the request.

Returns:



71
72
73
# File 'app/controllers/concerns/masks/controller.rb', line 71

def masked_session
  @masked_session ||= request.env[Masks::Middleware::SESSION_KEY]
end