Method: Apotomo::Widget#render
- Defined in:
- lib/apotomo/widget.rb
#render(*args, &block) ⇒ Object Also known as: emit
Render the view for the current state. Usually called at the end of a state method.
Options
- :view - Specifies the name of the view file to render. Defaults to the current state name.
- :template_format - Allows using a format different to :html.
- :layout - If set to a valid filename inside your cell's view_paths, the current state view will be rendered inside the layout (as known from controller actions). Layouts should reside in app/cells/layouts.
- see Cell::Base#render for additional options
Example: class MouseWidget < Apotomo::StatefulWidget def eat # ... do something render end
will just render the view eat.haml.
render :js => "alert('SQUEAK!');"
issues a squeaking alert dialog on the page.
131 132 133 |
# File 'lib/apotomo/widget.rb', line 131 def render(*args, &block) super end |