Module: Hyrax::ThemedLayoutController::ClassMethods

Defined in:
app/controllers/concerns/hyrax/themed_layout_controller.rb

Instance Method Summary collapse

Instance Method Details

#with_themed_layout(view_name = nil) ⇒ Object


14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/concerns/hyrax/themed_layout_controller.rb', line 14

def with_themed_layout(view_name = nil)
  case view_name
  when Symbol
    layout proc { |controller| controller.send(view_name) }
  when String
    layout("#{theme}/#{view_name}")
  else
    layout(theme)
  end
end