2010-07-19 07:51:04 -04:00
|
|
|
= Action Pack -- From request to response
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-08-03 15:12:16 -04:00
|
|
|
Action Pack is a framework for handling and responding to web requests. It
|
2010-07-19 07:51:04 -04:00
|
|
|
provides mechanisms for *routing* (mapping request URLs to actions), defining
|
|
|
|
*controllers* that implement actions, and generating responses by rendering
|
|
|
|
*views*, which are templates of various formats. In short, Action Pack
|
|
|
|
provides the view and controller layers in the MVC paradigm.
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-07-19 07:51:04 -04:00
|
|
|
It consists of several modules:
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-07-19 07:51:04 -04:00
|
|
|
* Action Dispatch, which parses information about the web request, handles
|
|
|
|
routing as defined by the user, and does advanced processing related to HTTP
|
|
|
|
such as MIME-type negotiation, decoding parameters in POST/PUT bodies,
|
|
|
|
handling HTTP caching logic, cookies and sessions.
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-07-19 07:51:04 -04:00
|
|
|
* Action Controller, which provides a base controller class that can be
|
|
|
|
subclassed to implement filters and actions to handle requests. The result
|
|
|
|
of an action is typically content generated from views.
|
|
|
|
|
|
|
|
* Action View, which handles view template lookup and rendering, and provides
|
|
|
|
view helpers that assist when building HTML forms, Atom feeds and more.
|
2011-04-03 03:59:37 -04:00
|
|
|
Template formats that Action View handles are ERB (embedded Ruby, typically
|
2011-03-29 16:21:21 -04:00
|
|
|
used to inline short Ruby snippets inside HTML), and XML Builder.
|
2010-07-19 07:51:04 -04:00
|
|
|
|
|
|
|
With the Ruby on Rails framework, users only directly interface with the
|
|
|
|
Action Controller module. Necessary Action Dispatch functionality is activated
|
|
|
|
by default and Action View rendering is implicitly triggered by Action
|
|
|
|
Controller. However, these modules are designed to function on their own and
|
|
|
|
can be used outside of Rails.
|
|
|
|
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-07-18 08:58:40 -04:00
|
|
|
== Download and installation
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2011-08-05 04:34:43 -04:00
|
|
|
The latest version of Action Pack can be installed with RubyGems:
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-07-18 08:58:40 -04:00
|
|
|
% [sudo] gem install actionpack
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2010-07-18 08:58:40 -04:00
|
|
|
Source code can be downloaded as part of the Rails project on GitHub
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2011-08-04 03:03:56 -04:00
|
|
|
* https://github.com/rails/rails/tree/master/actionpack
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
== License
|
|
|
|
|
2011-12-23 16:03:21 -05:00
|
|
|
Action Pack is released under the MIT license:
|
|
|
|
|
|
|
|
* http://www.opensource.org/licenses/MIT
|
2004-11-23 20:04:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
== Support
|
|
|
|
|
2010-07-18 08:58:40 -04:00
|
|
|
API documentation is at
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2011-05-24 11:42:01 -04:00
|
|
|
* http://api.rubyonrails.org
|
2010-07-18 08:58:40 -04:00
|
|
|
|
|
|
|
Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here:
|
|
|
|
|
2011-05-10 12:30:06 -04:00
|
|
|
* https://github.com/rails/rails/issues
|