Class: Paltrow::Rendering::Rails::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/paltrow/rendering/rails/template.rb

Instance Method Summary collapse

Instance Method Details

#call(handler:, page:) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/paltrow/rendering/rails/template.rb', line 5

def call handler:, page:
  handler.flash.now[:notice] = page.notice unless page.notice.empty?
  handler.flash.now[:alert] = page.alert unless page.alert.empty?
  handler.render(
    template: "#{page.resource}/#{page.action}",
    locals: page.locals
  )
end