Class: Granite::Controller

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Projector::Translations::Helper

#translate

Class Method Details

.local_prefixesObject



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

def self.local_prefixes
  [projector_path]
end

Instance Method Details

#projectorObject



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

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