Module

RenderMixin

There's no documentation for this item.

Public Methods
catch_content catch_content catches the thrown content from another template So when you throw_content(:foo) {…} you can catch_content :foo in another view or the layout.
included
partial This is merb’s partial render method. You name your partials _partialname.format.* , and then call it like partial(:partialname). If there is no ’/’ character in the argument passed in it will look for the partial in the view directory that corresponds to the current controller name. If you pass a string with a path in it you can render partials in other view directories. So if you create a views/shared directory then you can call partials that live there like partial(‘shared/foo’)
render Universal render method. Template handlers are registered by template extension. So you can use the same render method for any kind of template that implements an adapter module.
render_inline
render_js does a render with no layout. Also sets the content type header to text/javascript. Use this when you want to render a template with .jerb extension.
render_no_layout
render_nothing renders nothing but sets the status, defaults to 200. does send one ’ ’ space char, this is for safari and flash uploaders to work.
set_response_headers
set_status Sets the response’s status to the specified value. Use either an integer (200, 201, 302, etc.), or a Symbol as defined in Merb::ControllerExceptions::RESPONSE_CODES, such as :not_found, :created or :see_other.
Private Methods
cached_view_context this returns a ViewContext object populated with all the instance variables in your controller. This is used as the view context object for the Erubis templates.
choose_template_format Chooses the format of the template based on the params hash or the explicit request of the developer.
clean_view_context
find_partial
find_template OPTIMIZE : combine find_template and find_partial ?
glob_template This method will return a matching template at the specified path, using the template_name.format.engine convention
partial_for_collection
render_partial
unmatched For the benefit of error handlers, returns the most recent glob pattern which didn’t find a file in the filesystem
wrap_layout
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.