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



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

def self.local_prefixes
  [projector_path]
end

Instance Method Details

#projectorObject



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

def projector
  @projector ||=
    begin
      projector_class = action_class.public_send(projector_name)
      projector_class = projector_class.with(projector_context) if respond_to?(:projector_context, true)
      projector_class.new(projector_params)
    end
end