Module

Merb

Provides some basic generator support that is generally required in various Generators

From merb/session/cookie_store.rb

Most of this code is taken from bitsweat’s implementation in rails

From merb/mixins/web_controller.rb

Used by secondary actions (a PartsController or the view) to provide the standard objects associated with each request.

From merb/mixins/general_controller.rb

This module provides helper style functionality to all controllers.

Modules
Assets
AuthenticationMixin
BootLoader
Caching
Const
ControllerExceptions ControllerExceptions are a way of simplifying controller code by placing exceptional logic back into the MVC pattern.
ControllerMixin Module that is mixed in to all implemented controllers.
ErubisCaptureMixin
GeneralControllerMixin
GeneratorHelpers
GlobalHelper
InlinePartialMixin
Plugins
Rack
RenderMixin
ResponderMixin The ResponderMixin adds methods that help you manage what formats your controllers have available, determine what format(s) the client requested and is capable of handling, and perform content negotiation to pick the proper content format to deliver.
SessionMixin
Template
Test
ViewContextMixin The ViewContextMixin module provides a number of helper methods to views for linking to assets and other pages, dealing with JavaScript, and caching.
WebControllerMixin
Classes
AbstractController
AppGenerator
Config
Controller All of your web controllers will inherit from Merb::Controller. This superclass takes care of parsing the incoming headers and body into params and cookies and headers. If the request is a file upload it will stream it into a tempfile and pass in the filename and tempfile object to your controller via params. It also parses the ?query=string and puts that into params as well.
CookieStore If you have more than 4K of session data or don’t want your data to be visible to the user, pick another session store.
Cookies Cookies are read and written through Merb::Controller#cookies. The cookies you read are those received in request along with those that have been set during the current request. The cookies you write will be sent out with the response. Cookies are read by value (so you won’t get the cookie object itself back — just the value it holds).
Dispatcher
DrbServiceProvider
Logger
MailController Sending mail from a controller involves three steps:
Mailer You’ll need a simple config like this in merb_init.rb if you want to actually send mail:
MemCacheSession Sessions stored in memcached.
MemorySession Sessions stored in memory.
MemorySessionContainer
PartController
PluginGenerator
Request
Router
Server
UploadProgress Keeps track of the status of all currently processing uploads
ViewContext The ViewContext is really just an empty container for us to fill with instance variables from the controller, include helpers into and then use as the context object passed to Erubis when evaluating the templates.
Constants
GENERATOR_SCOPE Set up default generator scope
PROTECTED_IVARS
RELEASE Merb::RELEASE meanings: ‘svn’ : unreleased ‘pre’ : pre-release Gem candidates
VERSION
Public Attributes
logger Logger settings
Public Methods
add_mime_type Any specific outgoing headers should be included here. These are not the content-type header but anything in addition to it. tranform_method should be set to a symbol of the method used to transform a resource into this mime type. For example for the :xml mime type an object might be transformed by calling :to_xml, or for the :js mime type, :to_json. If there is no transform method, use nil.
add_response_headers! Adds outgoing headers to a mime type. This can be done with the Merb.add_mime_type method or directly here.
application_controller_path
available_mime_types Provides the currently implemented mime types as a hash
controller_path
environment
environment=
exception PLEASE STOP REMOVING THIS ONE GUYS! It’s used to show exceptions in the log file this is the second time I’ve had to add it back.
framework_path
framework_root Framework paths
helper_path
lib_path
load_paths
log_path
mailer_path
mime_transform_method Return the method name (if any) for the mimetype
mime_transform_method_defaults Return default arguments for transform method (if any)
model_path
part_path
remove_mime_type
remove_response_headers! Completely removes any headers set that are additional to the content-type header.
reset_default_mime_types! Sets the mime types and outgoing headers to their original states
response_headers
root Application paths
root=
root_path
router_path
set_mime_transform_method_defaults Set default arguments/proc for a format transform method
skeleton_path
svn_revision
svn_revision_file_path
svn_revision_filename
svn_revision_from_file
view_path
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.