Module: Merb::RenderMixin::ClassMethods
- Defined in:
- lib/merb-core/controller/mixins/render.rb
Instance Method Summary collapse
-
#default_layout ⇒ Object
Enable the default layout logic - reset the layout option.
-
#default_render_options ⇒ Object
Return the default render options.
-
#layout(layout) ⇒ Object
Set the default layout to use or nil/false to disable layout rendering.
-
#render_options(opts) ⇒ Object
Set default render options at the class level.
Instance Method Details
#default_layout ⇒ Object
Enable the default layout logic - reset the layout option.
48 49 50 |
# File 'lib/merb-core/controller/mixins/render.rb', line 48 def default_layout self..delete(:layout) end |
#default_render_options ⇒ Object
Return the default render options.
Returns
- Hash
-
An options hash
20 21 22 |
# File 'lib/merb-core/controller/mixins/render.rb', line 20 def self. ||= {} end |
#layout(layout) ⇒ Object
Set the default layout to use or nil/false to disable layout rendering. This is a shortcut for render_options :layout => false.
Parameters
- layout<~to_s>
-
The layout that should be used for this class.
Notes
You can override by passing :layout => true to render method.
Returns
- Hash
-
The default render options.
43 44 45 |
# File 'lib/merb-core/controller/mixins/render.rb', line 43 def layout(layout) self..update(:layout => (layout ? layout : false)) end |
#render_options(opts) ⇒ Object
Set default render options at the class level.
Parameters
- opts<Hash>
-
An options hash
28 29 30 |
# File 'lib/merb-core/controller/mixins/render.rb', line 28 def (opts) self. = opts end |