Permalink
Browse files

Merge docrails.

  • Loading branch information...
1 parent 549b18c commit c70b993a9e01547de88417cb8fa95b48acbed2db @lifo lifo committed Nov 14, 2008
Showing with 4,401 additions and 2,526 deletions.
  1. +3 −3 actionpack/lib/action_controller/base.rb
  2. +5 −2 railties/doc/README_FOR_APP
  3. +28 −5 railties/doc/guides/html/2_2_release_notes.html
  4. +27 −18 railties/doc/guides/html/actioncontroller_basics.html
  5. +487 −5 railties/doc/guides/html/activerecord_validations_callbacks.html
  6. +39 −33 railties/doc/guides/html/caching_with_rails.html
  7. +434 −0 railties/doc/guides/html/command_line.html
  8. +438 −0 railties/doc/guides/html/configuring.html
  9. +672 −480 railties/doc/guides/html/creating_plugins.html
  10. +2 −2 railties/doc/guides/html/debugging_rails_applications.html
  11. +137 −67 railties/doc/guides/html/finders.html
  12. +2 −2 railties/doc/guides/html/getting_started_with_rails.html
  13. +13 −0 railties/doc/guides/html/layouts_and_rendering.html
  14. +2 −2 railties/doc/guides/html/migrations.html
  15. +39 −9 railties/doc/guides/html/routing_outside_in.html
  16. +335 −206 railties/doc/guides/html/testing_rails_applications.html
  17. +15 −4 railties/doc/guides/source/2_2_release_notes.txt
  18. +2 −2 railties/doc/guides/source/actioncontroller_basics/http_auth.txt
  19. +4 −4 railties/doc/guides/source/actioncontroller_basics/methods.txt
  20. +7 −3 railties/doc/guides/source/actioncontroller_basics/params.txt
  21. +1 −1 railties/doc/guides/source/actioncontroller_basics/request_response_objects.txt
  22. +7 −7 railties/doc/guides/source/actioncontroller_basics/session.txt
  23. +1 −1 railties/doc/guides/source/actioncontroller_basics/streaming.txt
  24. +381 −2 railties/doc/guides/source/activerecord_validations_callbacks.txt
  25. +40 −34 railties/doc/guides/source/caching_with_rails.txt
  26. +147 −0 railties/doc/guides/source/command_line.txt
  27. +69 −71 railties/doc/guides/source/creating_plugins/acts_as_yaffle.txt
  28. +0 −861 railties/doc/guides/source/creating_plugins/basics.markdown
  29. +59 −0 railties/doc/guides/source/creating_plugins/controllers.txt
  30. +123 −0 railties/doc/guides/source/creating_plugins/core_ext.txt
  31. +8 −8 railties/doc/guides/source/creating_plugins/custom_route.txt
  32. +1 −0 railties/doc/guides/source/creating_plugins/gem.txt
  33. +39 −19 railties/doc/guides/source/creating_plugins/{custom_generator.txt → generator_method.txt}
  34. +51 −0 railties/doc/guides/source/creating_plugins/helpers.txt
  35. +38 −70 railties/doc/guides/source/creating_plugins/index.txt
  36. +97 −30 railties/doc/guides/source/creating_plugins/migration_generator.txt
  37. +76 −0 railties/doc/guides/source/creating_plugins/models.txt
  38. +2 −55 railties/doc/guides/source/creating_plugins/odds_and_ends.txt
  39. +0 −169 railties/doc/guides/source/creating_plugins/preparation.txt
  40. +0 −103 railties/doc/guides/source/creating_plugins/string_to_squawk.txt
  41. +230 −0 railties/doc/guides/source/creating_plugins/test_setup.txt
  42. +0 −61 railties/doc/guides/source/creating_plugins/view_helper.txt
  43. +2 −2 railties/doc/guides/source/debugging_rails_applications.txt
  44. +55 −29 railties/doc/guides/source/finders.txt
  45. +2 −2 railties/doc/guides/source/getting_started_with_rails.txt
  46. +3 −0 railties/doc/guides/source/layouts_and_rendering.txt
  47. +1 −1 railties/doc/guides/source/migrations/foreign_keys.txt
  48. +1 −1 railties/doc/guides/source/migrations/scheming.txt
  49. +27 −11 railties/doc/guides/source/routing_outside_in.txt
  50. +249 −141 railties/doc/guides/source/testing_rails_applications.txt
@@ -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>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 not containing a protocol</tt> - The current protocol and host is prepended to the string.
+ # * <tt>String</tt> starting with <tt>protocol://</tt> (like <tt>http://</tt>) - Is passed straight through as the target for redirection.
+ # * <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.
- # Short-hand for redirect_to(request.env["HTTP_REFERER"])
+ # Short-hand for <tt>redirect_to(request.env["HTTP_REFERER"])</tt>
#
# Examples:
# redirect_to :action => "show", :id => 5
@@ -1,2 +1,5 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
+To build the guides:
+
+* 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
@@ -243,6 +243,8 @@ <h2 id="site_title_tagline">Sustainable productivity for web-application develop
<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>
</ul>
@@ -525,7 +527,7 @@ <h2 id="_active_record">5. Active Record</h2>
<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>
<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>
<li>
<p>
@@ -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>
</p>
</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>
</li>
</ul></div>
@@ -693,9 +700,9 @@ <h3 id="_other_activerecord_changes">5.6. Other ActiveRecord Changes</h3>
</div>
<h2 id="_action_controller">6. Action Controller</h2>
<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>
-<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="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
@@ -756,8 +763,24 @@ <h3 id="_method_arrays_for_member_or_collection_routes">6.2. Method Arrays for M
</p>
</li>
</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="_other_action_controller_changes">6.3. Other Action Controller Changes</h3>
+<h3 id="_resources_with_specific_actions">6.3. Resources With Specific Actions</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>
<li>
<p>
Oops, something went wrong.

0 comments on commit c70b993

Please sign in to comment.