| Class | Mack::Rendering::Type::Layout |
| In: |
lib/mack/rendering/type/layout.rb
|
| Parent: | Mack::Rendering::Type::FileBase |
See Mack::Rendering::Type::FileBase render_file for more information.
The path to the file is built like such:
app/views/layouts/#{options[:layout] || "application"}.#{format (html, xml, js, etc...)}.#{extension defined in the engine}
Example:
app/views/layouts/application.html.erb
# File lib/mack/rendering/type/layout.rb, line 14
14: def render
15: l_file = Mack::Paths.layouts("#{self._options[:layout]}.#{self._options[:format]}")
16: begin
17: render_file(l_file, :layout)
18: rescue Mack::Errors::ResourceNotFound => e
19: Mack.logger.warn(e)
20: self.view_template.yield_to :view
21: end
22: end