Class: Merb::PartController

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

### Methods

_dispatch _template_location inherited method_missing new subclasses_list

### Included Modules

Merb::Mixins::WebController

### Attributes

params | [R] |

### Public Class methods

inherited(klass)

Sets the template root to the default parts view directory.

#### Parameters

klass<Class>: | The Merb::PartController inheriting from the base class.

new(web_controller, opts = {})

#### Parameters

web_controller<Merb::Controller>: | The controller calling this part.
opts<Hash>: | Additional options for this part.

subclasses_list()

#### Returns

Array[Class]: | Classes that inherit from Merb::PartController.

### Public Instance methods

_dispatch(action=:to_s)

#### Parameters

action<~to_s>: | An action to dispatch to. Defaults to :to_s.

#### Returns

String: | The part body.

_template_location(action, type = nil, controller = controller_name)

#### Parameters

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.

#### Returns

String: | The template location, i.e. ":controller/:action.:type".

method_missing(sym, *args, &blk)

Send any methods that are missing back up to the web controller Patched to set partial locals on the web controller

[Validate]