Class | Merb::PartController |
In: |
lib/merb-parts/part_controller.rb
|
Parent: | AbstractController |
A Merb::PartController is a light weight way to share logic and templates amongst controllers. Merb::PartControllers work just like Merb::controller. There is a filter stack, layouts (if needed) all the render functions, and url generation.
Cookies, params, and even the request object are shared with the web controller
params | [R] |
Sets the template root to the default parts view directory.
klass<Class>: | The Merb::PartController inheriting from the base class. |
web_controller<Merb::Controller>: | The controller calling this part. |
opts<Hash>: | Additional options for this part. |
action<~to_s>: | The name of the action that will be rendered. |
type<~to_s>: | The mime-type of the template that will be rendered. Defaults to nil. |
controller<~to_s>: | The name of the controller that will be rendered. Defaults to controller_name. |
String: | The template location, i.e. ":controller/:action.:type". |