Class: Granite::Controller

Inherits:
Object
  • Object
show all
Includes:
Translations
Defined in:
app/controllers/granite/controller.rb,
app/controllers/granite/controller/translations.rb

Defined Under Namespace

Modules: Translations

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Translations

#i18n_scopes, #translate

Class Method Details

.local_prefixesObject



28
29
30
# File 'app/controllers/granite/controller.rb', line 28

def self.local_prefixes
  [projector_path]
end

Instance Method Details

#projectorObject



16
17
18
19
20
21
22
# File 'app/controllers/granite/controller.rb', line 16

def projector
  @projector ||= begin
    action_projector_class = action_class.public_send(projector_name)
    action_projector_class = action_projector_class.as(projector_performer) if respond_to?(:projector_performer, true)
    action_projector_class.new(projector_params)
  end
end