Class | Merb::Controller |
In: |
lib/merb-core/controller/merb_controller.rb
|
Parent: | Merb::AbstractController |
headers | [R] | |
request | [R] | |
route | [RW] | |
status | [R] |
This list of actions that should not be callable.
Array[String]: | An array of actions that should not be dispatchable. |
This list of actions that should be callable.
Array[String]: | An array of actions that should be dispatched to even if they would not otherwise be. |
The list of actions that are callable, after taking defaults, _hidden_actions and _shown_actions into consideration. It is calculated once, the first time an action is dispatched for this controller.
SimpleSet[String]: | A set of actions that should be callable. |
Hide each of the given methods from being callable as actions.
*names<~to-s>: | Actions that should be added to the list. |
Array[String]: | An array of actions that should not be possible to dispatch to. |
klass<Merb::Controller>: | The Merb::Controller inheriting from the base class. |
Build a new controller.
Sets the variables that came in through the dispatch as available to the controller.
This method uses the :session_id_cookie_only and :query_string_whitelist configuration options. See CONFIG for more details.
request<Merb::Request>: | The Merb::Request that came in from Mongrel. |
status<Integer>: | An integer code for the status. Defaults to 200. |
headers<Hash{header => value}>: | A hash of headers to start the controller with. These headers can be overridden later by the headers method. |
Makes each of the given methods being callable as actions. You can use this to make methods included from modules callable as actions.
*names<~to-s>: | Actions that should be added to the list. |
Array[String]: | An array of actions that should be dispatched to even if they would not otherwise be. |
module Foo def self.included(base) base.show_action(:foo) end def foo # some actiony stuff end def foo_helper # this should not be an action end end
Dispatch the action.
action<~to_s>: | An action to dispatch to. Defaults to :index. |
String: | The string sent to the logger for time spent. |
ActionNotFound: | The requested action was not found in class. |
The location to look for a template for a particular controller, context, and mime-type. This is overridden from AbstractController, which defines a version of this that does not involve mime-types.
context<~to_s>: | The name of the action or template basename 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. |
By default, this renders ":controller/:action.:type". To change this, override it in your application class or in individual controllers.
Merb::Cookies: | A new Merb::Cookies instance representing the cookies that came in from the request object |
Headers are passed into the cookie object so that you can do:
cookies[:foo] = "bar"