Skip to content

Commit

Permalink
Merge docrails.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Nov 14, 2008
1 parent 549b18c commit c70b993
Show file tree
Hide file tree
Showing 50 changed files with 4,401 additions and 2,526 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_controller/base.rb
Expand Up @@ -1029,10 +1029,10 @@ def default_url_options(options = nil)
# #
# * <tt>Hash</tt> - The URL will be generated by calling url_for with the +options+. # * <tt>Hash</tt> - The URL will be generated by calling url_for with the +options+.
# * <tt>Record</tt> - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record. # * <tt>Record</tt> - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record.
# * <tt>String starting with protocol:// (like http://)</tt> - Is passed straight through as the target for redirection. # * <tt>String</tt> starting with <tt>protocol://</tt> (like <tt>http://</tt>) - Is passed straight through as the target for redirection.
# * <tt>String not containing a protocol</tt> - The current protocol and host is prepended to the string. # * <tt>String</tt> not containing a protocol - The current protocol and host is prepended to the string.
# * <tt>:back</tt> - Back to the page that issued the request. Useful for forms that are triggered from multiple places. # * <tt>:back</tt> - Back to the page that issued the request. Useful for forms that are triggered from multiple places.
# Short-hand for redirect_to(request.env["HTTP_REFERER"]) # Short-hand for <tt>redirect_to(request.env["HTTP_REFERER"])</tt>
# #
# Examples: # Examples:
# redirect_to :action => "show", :id => 5 # redirect_to :action => "show", :id => 5
Expand Down
7 changes: 5 additions & 2 deletions railties/doc/README_FOR_APP
@@ -1,2 +1,5 @@
Use this README file to introduce your application and point to useful places in the API for learning more. To build the guides:
Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
* Install source-highlighter (http://www.gnu.org/software/src-highlite/source-highlight.html)
* Install the mizuho gem (http://github.com/FooBarWidget/mizuho/tree/master)
* Run `rake guides` from the railties directory
33 changes: 28 additions & 5 deletions railties/doc/guides/html/2_2_release_notes.html
Expand Up @@ -243,6 +243,8 @@ <h2>Chapters</h2>


<li><a href="#_method_arrays_for_member_or_collection_routes">Method Arrays for Member or Collection Routes</a></li> <li><a href="#_method_arrays_for_member_or_collection_routes">Method Arrays for Member or Collection Routes</a></li>


<li><a href="#_resources_with_specific_actions">Resources With Specific Actions</a></li>

<li><a href="#_other_action_controller_changes">Other Action Controller Changes</a></li> <li><a href="#_other_action_controller_changes">Other Action Controller Changes</a></li>


</ul> </ul>
Expand Down Expand Up @@ -525,7 +527,7 @@ <h2 id="_active_record">5. Active Record</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="para"><p>There are two big additions to talk about here: transactional migrations and pooled database transactions. There's also a new (and cleaner) syntax for join table conditions, as well as a number of smaller improvements.</p></div> <div class="para"><p>There are two big additions to talk about here: transactional migrations and pooled database transactions. There's also a new (and cleaner) syntax for join table conditions, as well as a number of smaller improvements.</p></div>
<h3 id="_transactional_migrations">5.1. Transactional Migrations</h3> <h3 id="_transactional_migrations">5.1. Transactional Migrations</h3>
<div class="para"><p>Historically, multiple-step Rails migrations have been a source of trouble. If something went wrong during a migration, everything before the error changed the database and everything after the error wasn't applied. Also, the migration version was stored as having been executed, which means that it couldn't be simply rerun by <tt>rake db:migrate:redo</tt> after you fix the problem. Transactional migrations change this by wrapping migration steps in a DDL transaction, so that if any of them fail, the entire migration is undone. In Rails 2.2, transactional migrations are supported <strong>on PostgreSQL only</strong>. The code is extensible to other database types in the future.</p></div> <div class="para"><p>Historically, multiple-step Rails migrations have been a source of trouble. If something went wrong during a migration, everything before the error changed the database and everything after the error wasn't applied. Also, the migration version was stored as having been executed, which means that it couldn't be simply rerun by <tt>rake db:migrate:redo</tt> after you fix the problem. Transactional migrations change this by wrapping migration steps in a DDL transaction, so that if any of them fail, the entire migration is undone. In Rails 2.2, transactional migrations are supported on PostgreSQL out of the box. The code is extensible to other database types in the future - and IBM has already extended it to support the DB2 adapter.</p></div>
<div class="ilist"><ul> <div class="ilist"><ul>
<li> <li>
<p> <p>
Expand All @@ -542,6 +544,11 @@ <h3 id="_transactional_migrations">5.1. Transactional Migrations</h3>
<a href="http://adam.blog.heroku.com/past/2008/9/3/ddl_transactions/">DDL Transactions</a> <a href="http://adam.blog.heroku.com/past/2008/9/3/ddl_transactions/">DDL Transactions</a>
</p> </p>
</li> </li>
<li>
<p>
<a href="http://db2onrails.com/2008/11/08/a-major-milestone-for-db2-on-rails/">A major milestone for DB2 on Rails</a>
</p>
</li>
</ul></div> </ul></div>
</li> </li>
</ul></div> </ul></div>
Expand Down Expand Up @@ -693,9 +700,9 @@ <h3 id="_other_activerecord_changes">5.6. Other ActiveRecord Changes</h3>
</div> </div>
<h2 id="_action_controller">6. Action Controller</h2> <h2 id="_action_controller">6. Action Controller</h2>
<div class="sectionbody"> <div class="sectionbody">
<div class="para"><p>On the controller side, there are a couple of changes that will help tidy up your routes.</p></div> <div class="para"><p>On the controller side, there are several changes that will help tidy up your routes. There are also some internal changes in the routing engine to lower memory usage on complex applications.</p></div>
<h3 id="_shallow_route_nesting">6.1. Shallow Route Nesting</h3> <h3 id="_shallow_route_nesting">6.1. Shallow Route Nesting</h3>
<div class="para"><p>Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with - but you <em>can</em> supply more information.</p></div> <div class="para"><p>Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with.</p></div>
<div class="listingblock"> <div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 2.9 <div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini by Lorenzo Bettini
Expand Down Expand Up @@ -756,8 +763,24 @@ <h3 id="_method_arrays_for_member_or_collection_routes">6.2. Method Arrays for M
</p> </p>
</li> </li>
</ul></div> </ul></div>
<div class="para"><p>Action Controller now offers good support for HTTP conditional GET requests, as well as some other additions.</p></div> <h3 id="_resources_with_specific_actions">6.3. Resources With Specific Actions</h3>
<h3 id="_other_action_controller_changes">6.3. Other Action Controller Changes</h3> <div class="para"><p>By default, when you use <tt>map.resources</tt> to create a route, Rails generates routes for seven default actions (index, show, create, new, edit, update, and destroy). But each of these routes takes up memory in your application, and causes Rails to generate additional routing logic. Now you can use the <tt>:only</tt> and <tt>:except</tt> options to fine-tune the routes that Rails will generate for resources. You can supply a single action, an array of actions, or the special <tt>:all</tt> or <tt>:none</tt> options. These options are inherited by nested resources.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>map<span style="color: #990000">.</span>resources <span style="color: #990000">:</span>photos<span style="color: #990000">,</span> <span style="color: #990000">:</span>only <span style="color: #990000">=&gt;</span> <span style="color: #990000">[:</span>index<span style="color: #990000">,</span> <span style="color: #990000">:</span>show<span style="color: #990000">]</span>
map<span style="color: #990000">.</span>resources <span style="color: #990000">:</span>products<span style="color: #990000">,</span> <span style="color: #990000">:</span>except <span style="color: #990000">=&gt;</span> <span style="color: #990000">:</span>destroy
</tt></pre></div></div>
<div class="ilist"><ul>
<li>
<p>
Lead Contributor: <a href="http://experthuman.com/">Tom Stuart</a>
</p>
</li>
</ul></div>
<h3 id="_other_action_controller_changes">6.4. Other Action Controller Changes</h3>
<div class="ilist"><ul> <div class="ilist"><ul>
<li> <li>
<p> <p>
Expand Down

0 comments on commit c70b993

Please sign in to comment.