<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>railties/doc/guides/actionview/helpers.markdown</filename>
    </added>
    <added>
      <filename>railties/doc/guides/actionview/partials.markdown</filename>
    </added>
    <added>
      <filename>railties/doc/guides/activerecord/basics.markdown</filename>
    </added>
    <added>
      <filename>railties/doc/guides/creating_plugins/basics.markdown</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -38,7 +38,7 @@ module TMail
   # = Class Address
   # 
   # Provides a complete handling library for email addresses. Can parse a string of an
-  # address directly or take in preformatted addresses themseleves.  Allows you to add
+  # address directly or take in preformatted addresses themselves.  Allows you to add
   # and remove phrases from the front of the address and provides a compare function for
   # email addresses.
   # 
@@ -143,7 +143,7 @@ module TMail
       
       # This is to catch an unquoted &quot;@&quot; symbol in the local part of the
       # address.  Handles addresses like &lt;&quot;@&quot;@me.com&gt; and makes sure they
-      # stay like &lt;&quot;@&quot;@me.com&gt; (previously were becomming &lt;@@me.com&gt;)
+      # stay like &lt;&quot;@&quot;@me.com&gt; (previously were becoming &lt;@@me.com&gt;)
       if local &amp;&amp; (local.join == '@' || local.join =~ /\A[^&quot;].*?@.*?[^&quot;]\Z/)
         @local = &quot;\&quot;#{local.join}\&quot;&quot;
       else</diff>
      <filename>actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/address.rb</filename>
    </modified>
    <modified>
      <diff>@@ -59,7 +59,7 @@ module TMail
       #
       # This is because a mailbox doesn't have the : after the From that designates the
       # beginning of the envelope sender (which can be different to the from address of 
-      # the emial)
+      # the email)
       #
       # Other fields can be passed as normal, &quot;Reply-To&quot;, &quot;Received&quot; etc.
       #</diff>
      <filename>actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/header.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,7 +42,7 @@ module TMail
     # Allows you to query the mail object with a string to get the contents
     # of the field you want.
     # 
-    # Returns a string of the exact contnts of the field
+    # Returns a string of the exact contents of the field
     # 
     #  mail.from = &quot;mikel &lt;mikel@lindsaar.net&gt;&quot;
     #  mail.header_string(&quot;From&quot;) #=&gt; &quot;mikel &lt;mikel@lindsaar.net&gt;&quot;</diff>
      <filename>actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb</filename>
    </modified>
    <modified>
      <diff>@@ -255,7 +255,7 @@ module TMail
     alias fetch []
 
     # Allows you to set or delete TMail header objects at will.
-    # Eamples:
+    # Examples:
     #  @mail = TMail::Mail.new
     #  @mail['to'].to_s       # =&gt; 'mikel@test.com.au'
     #  @mail['to'] = 'mikel@elsewhere.org'
@@ -265,7 +265,7 @@ module TMail
     #  @mail['to'].to_s       # =&gt; nil
     #  @mail.encoded          # =&gt; &quot;\r\n&quot;
     # 
-    # Note: setting mail[] = nil actualy deletes the header field in question from the object,
+    # Note: setting mail[] = nil actually deletes the header field in question from the object,
     # it does not just set the value of the hash to nil
     def []=( key, val )
       dkey = key.downcase</diff>
      <filename>actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ http://www.rubyonrails.org.
 A short rundown of the major features:
 
 * Actions grouped in controller as methods instead of separate command objects
-  and can therefore share helper methods.
+  and can therefore share helper methods
 
     BlogController &lt; ActionController::Base
       def show
@@ -168,7 +168,7 @@ A short rundown of the major features:
   {Learn more}[link:classes/ActionController/Base.html]
 
 
-* Javascript and Ajax integration.
+* Javascript and Ajax integration
 
     link_to_function &quot;Greeting&quot;, &quot;alert('Hello world!')&quot;
     link_to_remote &quot;Delete this post&quot;, :update =&gt; &quot;posts&quot;, 
@@ -177,7 +177,7 @@ A short rundown of the major features:
   {Learn more}[link:classes/ActionView/Helpers/JavaScriptHelper.html]
 
 
-* Pagination for navigating lists of results.
+* Pagination for navigating lists of results
 
     # controller
     def list
@@ -192,15 +192,9 @@ A short rundown of the major features:
   {Learn more}[link:classes/ActionController/Pagination.html]
 
 
-* Easy testing of both controller and template result through TestRequest/Response
-
-    class LoginControllerTest &lt; Test::Unit::TestCase
-      def setup
-        @controller = LoginController.new
-        @request    = ActionController::TestRequest.new
-        @response   = ActionController::TestResponse.new
-      end
+* Easy testing of both controller and rendered template through ActionController::TestCase
 
+    class LoginControllerTest &lt; ActionController::TestCase
       def test_failing_authenticate
         process :authenticate, :user_name =&gt; &quot;nop&quot;, :password =&gt; &quot;&quot;
         assert flash.has_key?(:alert)
@@ -208,7 +202,7 @@ A short rundown of the major features:
       end
     end
 
-  {Learn more}[link:classes/ActionController/TestRequest.html]
+  {Learn more}[link:classes/ActionController/TestCase.html]
 
 
 * Automated benchmarking and integrated logging</diff>
      <filename>actionpack/README</filename>
    </modified>
    <modified>
      <diff>@@ -21,10 +21,8 @@ module ActionController
     # from the response HTML or elements selected by the enclosing assertion.
     # 
     # In addition to HTML responses, you can make the following assertions:
-    # * +assert_select_rjs+ - Assertions on HTML content of RJS update and
-    #     insertion operations.
-    # * +assert_select_encoded+ - Assertions on HTML encoded inside XML,
-    #     for example for dealing with feed item descriptions.
+    # * +assert_select_rjs+ - Assertions on HTML content of RJS update and insertion operations.
+    # * +assert_select_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions.
     # * +assert_select_email+ - Assertions on the HTML body of an e-mail.
     #
     # Also see HTML::Selector to learn how to use selectors.</diff>
      <filename>actionpack/lib/action_controller/assertions/selector_assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module ActionController #:nodoc:
   module Caching
     # Fragment caching is used for caching various blocks within templates without caching the entire action as a whole. This is useful when
     # certain elements of an action change frequently or depend on complicated state while other parts rarely change or can be shared amongst multiple
-    # parties. The caching is doing using the cache helper available in the Action View. A template with caching might look something like:
+    # parties. The caching is done using the cache helper available in the Action View. A template with caching might look something like:
     #
     #   &lt;b&gt;Hello &lt;%= @name %&gt;&lt;/b&gt;
     #   &lt;% cache do %&gt;</diff>
      <filename>actionpack/lib/action_controller/caching/fragments.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,16 @@ module ActionController #:nodoc:
   #
   #   cookies.delete :user_name
   #
+  # Please note that if you specify a :domain when setting a cookie, you must also specify the domain when deleting the cookie:
+  #
+  #  cookies[:key] = {
+  #    :value =&gt; 'a yummy cookie',
+  #    :expires =&gt; 1.year.from_now,
+  #    :domain =&gt; 'domain.com'
+  #  }
+  #
+  #  cookies.delete(:key, :domain =&gt; 'domain.com')
+  #
   # The option symbols for setting cookies are:
   #
   # * &lt;tt&gt;:value&lt;/tt&gt; - The cookie's value or list of values (as an array).</diff>
      <filename>actionpack/lib/action_controller/cookies.rb</filename>
    </modified>
    <modified>
      <diff>@@ -101,7 +101,7 @@ module ActionController
         @https = flag
       end
 
-      # Return +true+ if the session is mimicing a secure HTTPS request.
+      # Return +true+ if the session is mimicking a secure HTTPS request.
       #
       #   if session.https?
       #     ...</diff>
      <filename>actionpack/lib/action_controller/integration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -250,7 +250,7 @@ end_msg
 
           # Convert 'cookie' header to 'Set-Cookie' headers.
           # Because Set-Cookie header can appear more the once in the response body,
-          # we store it in a line break seperated string that will be translated to
+          # we store it in a line break separated string that will be translated to
           # multiple Set-Cookie header by the handler.
           if cookie = options.delete('cookie')
             cookies = []</diff>
      <filename>actionpack/lib/action_controller/rack_process.rb</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,7 @@ module ActionController
       request_method == :head
     end
 
-    # Provides acccess to the request's HTTP headers, for example:
+    # Provides access to the request's HTTP headers, for example:
     #  request.headers[&quot;Content-Type&quot;] # =&gt; &quot;text/plain&quot;
     def headers
       @headers ||= ActionController::Http::Headers.new(@env)
@@ -265,7 +265,7 @@ EOM
       parts[0..-(tld_length+2)]
     end
 
-    # Return the query string, accounting for server idiosyncracies.
+    # Return the query string, accounting for server idiosyncrasies.
     def query_string
       if uri = @env['REQUEST_URI']
         uri.split('?', 2)[1] || ''
@@ -274,7 +274,7 @@ EOM
       end
     end
 
-    # Return the request URI, accounting for server idiosyncracies.
+    # Return the request URI, accounting for server idiosyncrasies.
     # WEBrick includes the full URL. IIS leaves REQUEST_URI blank.
     def request_uri
       if uri = @env['REQUEST_URI']</diff>
      <filename>actionpack/lib/action_controller/request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module ActionController #:nodoc:
     # forged link from another site, is done by embedding a token based on the session (which an attacker wouldn't know) in all
     # forms and Ajax requests generated by Rails and then verifying the authenticity of that token in the controller.  Only
     # HTML/JavaScript requests are checked, so this will not protect your XML API (presumably you'll have a different authentication
-    # scheme there anyway).  Also, GET requests are not protected as these should be indempotent anyway.
+    # scheme there anyway).  Also, GET requests are not protected as these should be idempotent anyway.
     #
     # This is turned on with the &lt;tt&gt;protect_from_forgery&lt;/tt&gt; method, which will check the token and raise an
     # ActionController::InvalidAuthenticityToken if it doesn't match what was expected. You can customize the error message in</diff>
      <filename>actionpack/lib/action_controller/request_forgery_protection.rb</filename>
    </modified>
    <modified>
      <diff>@@ -296,6 +296,10 @@ module ActionController
     #     article_comments_url(:article_id =&gt; @article)
     #     article_comment_url(:article_id =&gt; @article, :id =&gt; @comment)
     #
+    #   If you don't want to load all objects from the database you might want to use the &lt;tt&gt;article_id&lt;/tt&gt; directly:
+    #
+    #     articles_comments_url(@comment.article_id, @comment)
+    #
     # * &lt;tt&gt;:name_prefix&lt;/tt&gt; - Define a prefix for all generated routes, usually ending in an underscore.
     #   Use this if you have named routes that may clash.
     #</diff>
      <filename>actionpack/lib/action_controller/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,19 +12,21 @@ module ActionController #:nodoc:
     X_SENDFILE_HEADER = 'X-Sendfile'.freeze
 
     protected
-      # Sends the file by streaming it 4096 bytes at a time. This way the
-      # whole file doesn't need to be read into memory at once.  This makes
-      # it feasible to send even large files.
+      # Sends the file, by default streaming it 4096 bytes at a time. This way the
+      # whole file doesn't need to be read into memory at once. This makes it
+      # feasible to send even large files. You can optionally turn off streaming
+      # and send the whole file at once.
       #
-      # Be careful to sanitize the path parameter if it coming from a web
+      # Be careful to sanitize the path parameter if it is coming from a web
       # page. &lt;tt&gt;send_file(params[:path])&lt;/tt&gt; allows a malicious user to
       # download any file on your server.
       #
       # Options:
       # * &lt;tt&gt;:filename&lt;/tt&gt; - suggests a filename for the browser to use.
       #   Defaults to &lt;tt&gt;File.basename(path)&lt;/tt&gt;.
-      # * &lt;tt&gt;:type&lt;/tt&gt; - specifies an HTTP content type.
-      #   Defaults to 'application/octet-stream'.
+      # * &lt;tt&gt;:type&lt;/tt&gt; - specifies an HTTP content type. Defaults to 'application/octet-stream'.
+      # * &lt;tt&gt;:length&lt;/tt&gt; - used to manually override the length (in bytes) of the content that
+      #   is going to be sent to the client. Defaults to &lt;tt&gt;File.size(path)&lt;/tt&gt;.
       # * &lt;tt&gt;:disposition&lt;/tt&gt; - specifies whether the file will be shown inline or downloaded.
       #   Valid values are 'inline' and 'attachment' (default).
       # * &lt;tt&gt;:stream&lt;/tt&gt; - whether to send the file to the user agent as it is read (+true+)
@@ -35,6 +37,12 @@ module ActionController #:nodoc:
       # * &lt;tt&gt;:url_based_filename&lt;/tt&gt; - set to +true+ if you want the browser guess the filename from
       #   the URL, which is necessary for i18n filenames on certain browsers
       #   (setting &lt;tt&gt;:filename&lt;/tt&gt; overrides this option).
+      # * &lt;tt&gt;:x_sendfile&lt;/tt&gt; - uses X-Sendfile to send the file when set to +true+. This is currently
+      #   only available with Lighttpd/Apache2 and specific modules installed and activated. Since this
+      #   uses the web server to send the file, this may lower memory consumption on your server and
+      #   it will not block your application for further requests.
+      #   See http://blog.lighttpd.net/articles/2006/07/02/x-sendfile and
+      #   http://tn123.ath.cx/mod_xsendfile/ for details. Defaults to +false+.
       #
       # The default Content-Type and Content-Disposition headers are
       # set to download arbitrary binary files in as many browsers as
@@ -99,8 +107,7 @@ module ActionController #:nodoc:
       #
       # Options:
       # * &lt;tt&gt;:filename&lt;/tt&gt; - suggests a filename for the browser to use.
-      # * &lt;tt&gt;:type&lt;/tt&gt; - specifies an HTTP content type.
-      #   Defaults to 'application/octet-stream'.
+      # * &lt;tt&gt;:type&lt;/tt&gt; - specifies an HTTP content type. Defaults to 'application/octet-stream'.
       # * &lt;tt&gt;:disposition&lt;/tt&gt; - specifies whether the file will be shown inline or downloaded.
       #   Valid values are 'inline' and 'attachment' (default).
       # * &lt;tt&gt;:status&lt;/tt&gt; - specifies the status code to send with the response. Defaults to '200 OK'.</diff>
      <filename>actionpack/lib/action_controller/streaming.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,27 @@ module ActionController
     end
   end
 
+  # Superclass for Action Controller functional tests. Infers the controller under test from the test class name,
+  # and creates @controller, @request, @response instance variables.
+  #
+  #   class WidgetsControllerTest &lt; ActionController::TestCase
+  #     def test_index
+  #       get :index
+  #     end
+  #   end
+  #
+  # * @controller - WidgetController.new
+  # * @request    - ActionController::TestRequest.new
+  # * @response   - ActionController::TestResponse.new
+  #
+  # (Earlier versions of Rails required each functional test to subclass Test::Unit::TestCase and define
+  # @controller, @request, @response in +setup+.)
+  #
+  # If the controller cannot be inferred from the test class name, you can explicity set it with +tests+.
+  #
+  #   class SpecialEdgeCaseWidgetsControllerTest &lt; ActionController::TestCase
+  #     tests WidgetController
+  #   end
   class TestCase &lt; ActiveSupport::TestCase
     # When the request.remote_addr remains the default for testing, which is 0.0.0.0, the exception is simply raised inline
     # (bystepping the regular exception handling from rescue_action). If the request.remote_addr is anything else, the regular
@@ -41,6 +62,8 @@ module ActionController
     @@controller_class = nil
 
     class &lt;&lt; self
+      # Sets the controller class name. Useful if the name can't be inferred from test class.
+      # Expects +controller_class+ as a constant. Example: &lt;tt&gt;tests WidgetController&lt;/tt&gt;.
       def tests(controller_class)
         self.controller_class = controller_class
       end</diff>
      <filename>actionpack/lib/action_controller/test_case.rb</filename>
    </modified>
    <modified>
      <diff>@@ -211,7 +211,7 @@ module ActionController #:nodoc:
       template._first_render
     end
 
-    # A shortcut to the flash. Returns an empyt hash if no session flash exists.
+    # A shortcut to the flash. Returns an empty hash if no session flash exists.
     def flash
       session['flash'] || {}
     end</diff>
      <filename>actionpack/lib/action_controller/test_process.rb</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ module HTML
   #
   # When using a combination of the above, the element name comes first
   # followed by identifier, class names, attributes, pseudo classes and
-  # negation in any order. Do not seprate these parts with spaces!
+  # negation in any order. Do not separate these parts with spaces!
   # Space separation is used for descendant selectors.
   #
   # For example:
@@ -158,7 +158,7 @@ module HTML
   # * &lt;tt&gt;:not(selector)&lt;/tt&gt; -- Match the element only if the element does not
   #   match the simple selector.
   #
-  # As you can see, &lt;tt&gt;:nth-child&lt;tt&gt; pseudo class and its varient can get quite
+  # As you can see, &lt;tt&gt;:nth-child&lt;tt&gt; pseudo class and its variant can get quite
   # tricky and the CSS specification doesn't do a much better job explaining it.
   # But after reading the examples and trying a few combinations, it's easy to
   # figure out.</diff>
      <filename>actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb</filename>
    </modified>
    <modified>
      <diff>@@ -177,7 +177,7 @@ module ActionView #:nodoc:
     end
 
     def self.cache_template_extensions=(*args)
-      ActiveSupport::Deprecation.warn(&quot;config.action_view.cache_template_extensions option has been deprecated and has no affect. &quot; &lt;&lt;
+      ActiveSupport::Deprecation.warn(&quot;config.action_view.cache_template_extensions option has been deprecated and has no effect. &quot; &lt;&lt;
                                        &quot;Please remove it from your config files.&quot;, caller)
     end
 </diff>
      <filename>actionpack/lib/action_view/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -141,7 +141,7 @@ module ActionView
       #
       #   error_messages_for 'user_common', 'user', :object_name =&gt; 'user'
       #
-      # If the objects cannot be located as instance variables, you can add an extra &lt;tt&gt;:object&lt;/tt&gt; paremeter which gives the actual
+      # If the objects cannot be located as instance variables, you can add an extra &lt;tt&gt;:object&lt;/tt&gt; parameter which gives the actual
       # object (or array of objects to use):
       #
       #   error_messages_for 'user', :object =&gt; @question.user</diff>
      <filename>actionpack/lib/action_view/helpers/active_record_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -280,11 +280,11 @@ module ActionView
       #
       #   # Generates a date select that discards the type of the field and defaults to the date in 
       #   # my_date (six days after today)
-      #   select_datetime(my_date_time, :discard_type =&gt; true)
+      #   select_date(my_date, :discard_type =&gt; true)
       #
       #   # Generates a date select that defaults to the datetime in my_date (six days after today)
       #   # prefixed with 'payday' rather than 'date'
-      #   select_datetime(my_date_time, :prefix =&gt; 'payday')
+      #   select_date(my_date, :prefix =&gt; 'payday')
       #
       def select_date(date = Date.current, options = {}, html_options = {})
         options[:order] ||= []</diff>
      <filename>actionpack/lib/action_view/helpers/date_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,21 +2,28 @@ module ActionView
   module Helpers
     # Provides a set of methods for making it easier to debug Rails objects.
     module DebugHelper
-      # Returns a &lt;pre&gt;-tag that has +object+ dumped by YAML. This creates a very
-      # readable way to inspect an object.
+      # Returns a YAML representation of +object+ wrapped with &lt;pre&gt; and &lt;/pre&gt;.
+      # If the object cannot be converted to YAML using +to_yaml+, +inspect+ will be called instead.
+      # Useful for inspecting an object at the time of rendering.
       #
       # ==== Example
-      #  my_hash = {'first' =&gt; 1, 'second' =&gt; 'two', 'third' =&gt; [1,2,3]}
-      #  debug(my_hash)
       #
-      #  =&gt; &lt;pre class='debug_dump'&gt;--- 
-      #  first: 1
-      #  second: two
-      #  third: 
-      #  - 1
-      #  - 2
-      #  - 3
-      #  &lt;/pre&gt;
+      #   @user = User.new({ :username =&gt; 'testing', :password =&gt; 'xyz', :age =&gt; 42}) %&gt;
+      #   debug(@user)
+      #   # =&gt;
+      #   &lt;pre class='debug_dump'&gt;--- !ruby/object:User
+      #   attributes:
+      #   &amp;nbsp; updated_at:
+      #   &amp;nbsp; username: testing
+      #
+      #   &amp;nbsp; age: 42
+      #   &amp;nbsp; password: xyz
+      #   &amp;nbsp; created_at:
+      #   attributes_cache: {}
+      #
+      #   new_record: true
+      #   &lt;/pre&gt;
+
       def debug(object)
         begin
           Marshal::dump(object)
@@ -28,4 +35,4 @@ module ActionView
       end
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>actionpack/lib/action_view/helpers/debug_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -76,7 +76,7 @@ module ActionView
       # Creates a form and a scope around a specific model object that is used as
       # a base for questioning about values for the fields.
       #
-      # Rails provides succint resource-oriented form generation with +form_for+
+      # Rails provides succinct resource-oriented form generation with +form_for+
       # like this:
       #
       #   &lt;% form_for @offer do |f| %&gt;
@@ -449,8 +449,37 @@ module ActionView
       # assigned to the template (identified by +object+). It's intended that +method+ returns an integer and if that
       # integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a
       # hash with +options+. The +checked_value+ defaults to 1 while the default +unchecked_value+
-      # is set to 0 which is convenient for boolean values. Since HTTP standards say that unchecked checkboxes don't post anything,
-      # we add a hidden value with the same name as the checkbox as a work around.
+      # is set to 0 which is convenient for boolean values.
+      #
+      # ==== Gotcha
+      #
+      # The HTML specification says unchecked check boxes are not successful, and
+      # thus web browsers do not send them. Unfortunately this introduces a gotcha:
+      # if an Invoice model has a +paid+ flag, and in the form that edits a paid
+      # invoice the user unchecks its check box, no +paid+ parameter is sent. So,
+      # any mass-assignment idiom like
+      #
+      #   @invoice.update_attributes(params[:invoice])
+      #
+      # wouldn't update the flag.
+      #
+      # To prevent this the helper generates a hidden field with the same name as
+      # the checkbox after the very check box. So, the client either sends only the
+      # hidden field (representing the check box is unchecked), or both fields.
+      # Since the HTML specification says key/value pairs have to be sent in the
+      # same order they appear in the form and Rails parameters extraction always
+      # gets the first occurrence of any given key, that works in ordinary forms.
+      #
+      # Unfortunately that workaround does not work when the check box goes
+      # within an array-like parameter, as in
+      #
+      #   &lt;% fields_for &quot;project[invoice_attributes][]&quot;, invoice, :index =&gt; nil do |form| %&gt;
+      #     &lt;%= form.check_box :paid %&gt;
+      #     ...
+      #   &lt;% end %&gt;
+      #
+      # because parameter name repetition is precisely what Rails seeks to distinguish
+      # the elements of the array.
       #
       # ==== Examples
       #   # Let's say that @post.validated? is 1:</diff>
      <filename>actionpack/lib/action_view/helpers/form_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -274,9 +274,11 @@ module ActionView
         end
       end
 
-      # Returns a string of option tags for pretty much any country in the world. Supply a country name as +selected+ to
-      # have it marked as the selected option tag. You can also supply an array of countries as +priority_countries+, so
-      # that they will be listed above the rest of the (long) list.
+      # Returns a string of option tags for most countries in the
+      # world (as defined in COUNTRIES). Supply a country name as
+      # +selected+ to have it marked as the selected option tag. You
+      # can also supply an array of countries as +priority_countries+,
+      # so that they will be listed above the rest of the (long) list.
       #
       # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
       def country_options_for_select(selected = nil, priority_countries = nil)</diff>
      <filename>actionpack/lib/action_view/helpers/form_options_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -44,13 +44,22 @@ module ActionView
 
       include PrototypeHelper
 
-      # Returns a link that will trigger a JavaScript +function+ using the
+      # Returns a link of the given +name+ that will trigger a JavaScript +function+ using the
       # onclick handler and return false after the fact.
       #
+      # The first argument +name+ is used as the link text.
+      #
+      # The next arguments are optional and may include the javascript function definition and a hash of html_options.
+      #
       # The +function+ argument can be omitted in favor of an +update_page+
       # block, which evaluates to a string when the template is rendered
       # (instead of making an Ajax request first).
       #
+      # The +html_options+ will accept a hash of html attributes for the link tag. Some examples are :class =&gt; &quot;nav_button&quot;, :id =&gt; &quot;articles_nav_button&quot;
+      #
+      # Note: if you choose to specify the javascript function in a block, but would like to pass html_options, set the +function+ parameter to nil
+      #
+      #
       # Examples:
       #   link_to_function &quot;Greeting&quot;, &quot;alert('Hello world!')&quot;
       #     Produces:
@@ -89,13 +98,21 @@ module ActionView
         content_tag(:a, name, html_options.merge(:href =&gt; href, :onclick =&gt; onclick))
       end
 
-      # Returns a button that'll trigger a JavaScript +function+ using the
+      # Returns a button with the given +name+ text that'll trigger a JavaScript +function+ using the
       # onclick handler.
       #
+      # The first argument +name+ is used as the button's value or display text.
+      #
+      # The next arguments are optional and may include the javascript function definition and a hash of html_options.
+      #
       # The +function+ argument can be omitted in favor of an +update_page+
       # block, which evaluates to a string when the template is rendered
       # (instead of making an Ajax request first).
       #
+      # The +html_options+ will accept a hash of html attributes for the link tag. Some examples are :class =&gt; &quot;nav_button&quot;, :id =&gt; &quot;articles_nav_button&quot;
+      #
+      # Note: if you choose to specify the javascript function in a block, but would like to pass html_options, set the +function+ parameter to nil
+      #
       # Examples:
       #   button_to_function &quot;Greeting&quot;, &quot;alert('Hello world!')&quot;
       #   button_to_function &quot;Delete&quot;, &quot;if (confirm('Really?')) do_delete()&quot;</diff>
      <filename>actionpack/lib/action_view/helpers/javascript_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -61,7 +61,7 @@ module ActionView
     #
     # == Designing your Rails actions for Ajax
     # When building your action handlers (that is, the Rails actions that receive your background requests), it's
-    # important to remember a few things.  First, whatever your action would normall return to the browser, it will
+    # important to remember a few things.  First, whatever your action would normally return to the browser, it will
     # return to the Ajax call.  As such, you typically don't want to render with a layout.  This call will cause
     # the layout to be transmitted back to your page, and, if you have a full HTML/CSS, will likely mess a lot of things up.
     # You can turn the layout off on particular actions by doing the following:</diff>
      <filename>actionpack/lib/action_view/helpers/prototype_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -184,7 +184,7 @@ module ActionView
           HTML::WhiteListSanitizer.allowed_attributes.merge(attributes)
         end
 
-        # Adds to the Set of allowed CSS properties for the #sanitize and +sanitize_css+ heleprs.
+        # Adds to the Set of allowed CSS properties for the #sanitize and +sanitize_css+ helpers.
         #
         #   Rails::Initializer.run do |config|
         #     config.action_view.sanitized_allowed_css_properties = 'expression'</diff>
      <filename>actionpack/lib/action_view/helpers/sanitize_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -193,7 +193,7 @@ module ActionView
       #                          
       # * &lt;tt&gt;:onDrop&lt;/tt&gt; - Called when a +draggable_element+ is dropped onto
       #   this element. Override this callback with a JavaScript expression to 
-      #   change the default drop behavour. Example:
+      #   change the default drop behaviour. Example:
       #                          
       #     :onDrop =&gt; &quot;function(draggable_element, droppable_element, event) { alert('I like bananas') }&quot;
       #                          </diff>
      <filename>actionpack/lib/action_view/helpers/scriptaculous_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -64,7 +64,7 @@ module ActionView
       #   &lt;% content_tag :div, :class =&gt; &quot;strong&quot; do -%&gt;
       #     Hello world!
       #   &lt;% end -%&gt;
-      #    # =&gt; &lt;div class=&quot;strong&quot;&gt;&lt;p&gt;Hello world!&lt;/p&gt;&lt;/div&gt;
+      #    # =&gt; &lt;div class=&quot;strong&quot;&gt;Hello world!&lt;/div&gt;
       def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &amp;block)
         if block_given?
           options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)</diff>
      <filename>actionpack/lib/action_view/helpers/tag_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -185,7 +185,7 @@ module ActionView
       #   link_to &quot;Nonsense search&quot;, searches_path(:foo =&gt; &quot;bar&quot;, :baz =&gt; &quot;quux&quot;)
       #   # =&gt; &lt;a href=&quot;/searches?foo=bar&amp;amp;baz=quux&quot;&gt;Nonsense search&lt;/a&gt;
       #
-      # The three options specfic to +link_to+ (&lt;tt&gt;:confirm&lt;/tt&gt;, &lt;tt&gt;:popup&lt;/tt&gt;, and &lt;tt&gt;:method&lt;/tt&gt;) are used as follows:
+      # The three options specific to +link_to+ (&lt;tt&gt;:confirm&lt;/tt&gt;, &lt;tt&gt;:popup&lt;/tt&gt;, and &lt;tt&gt;:method&lt;/tt&gt;) are used as follows:
       #
       #   link_to &quot;Visit Other Site&quot;, &quot;http://www.rubyonrails.org/&quot;, :confirm =&gt; &quot;Are you sure?&quot;
       #   # =&gt; &lt;a href=&quot;http://www.rubyonrails.org/&quot; onclick=&quot;return confirm('Are you sure?');&quot;&gt;Visit Other Site&lt;/a&gt;</diff>
      <filename>actionpack/lib/action_view/helpers/url_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,7 +34,7 @@ module ActiveRecord
         class_to_reflection = {}
         # Not all records have the same class, so group then preload
         # group on the reflection itself so that if various subclass share the same association then we do not split them
-        # unncessarily
+        # unnecessarily
         records.group_by {|record| class_to_reflection[record.class] ||= record.class.reflections[association]}.each do |reflection, records|
           raise ConfigurationError, &quot;Association named '#{ association }' was not found; perhaps you misspelled it?&quot; unless reflection
           send(&quot;preload_#{reflection.macro}_association&quot;, records, reflection, preload_options)</diff>
      <filename>activerecord/lib/active_record/association_preload.rb</filename>
    </modified>
    <modified>
      <diff>@@ -582,12 +582,13 @@ module ActiveRecord
     #          has_many :clients
     #        end
     #
-    #       class Company &lt; ActiveRecord::Base; end
+    #       class Client &lt; ActiveRecord::Base; end
     #     end
     #   end
     #
-    # When Firm#clients is called, it will in turn call &lt;tt&gt;MyApplication::Business::Company.find(firm.id)&lt;/tt&gt;. If you want to associate
-    # with a class in another module scope, this can be done by specifying the complete class name.  Example:
+    # When &lt;tt&gt;Firm#clients&lt;/tt&gt; is called, it will in turn call &lt;tt&gt;MyApplication::Business::Client.find_all_by_firm_id(firm.id)&lt;/tt&gt;.
+    # If you want to associate with a class in another module scope, this can be done by specifying the complete class name.
+    # Example:
     #
     #   module MyApplication
     #     module Business</diff>
      <filename>activerecord/lib/active_record/associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module ActiveRecord #:nodoc:
   class ActiveRecordError &lt; StandardError
   end
 
-  # Raised when the single-table inheritance mechanism failes to locate the subclass
+  # Raised when the single-table inheritance mechanism fails to locate the subclass
   # (for example due to improper usage of column that +inheritance_column+ points to).
   class SubclassNotFound &lt; ActiveRecordError #:nodoc:
   end
@@ -97,7 +97,7 @@ module ActiveRecord #:nodoc:
   class MissingAttributeError &lt; NoMethodError
   end
 
-  # Raised when an error occured while doing a mass assignment to an attribute through the
+  # Raised when an error occurred while doing a mass assignment to an attribute through the
   # &lt;tt&gt;attributes=&lt;/tt&gt; method. The exception has an +attribute+ property that is the name of the
   # offending attribute.
   class AttributeAssignmentError &lt; ActiveRecordError
@@ -271,7 +271,7 @@ module ActiveRecord #:nodoc:
   #   # Now 'Bob' exist and is an 'admin'
   #   User.find_or_create_by_name('Bob', :age =&gt; 40) { |u| u.admin = true }
   #
-  # Use the &lt;tt&gt;find_or_initialize_by_&lt;/tt&gt; finder if you want to return a new record without saving it first. Protected attributes won't be setted unless they are given in a block. For example:
+  # Use the &lt;tt&gt;find_or_initialize_by_&lt;/tt&gt; finder if you want to return a new record without saving it first. Protected attributes won't be set unless they are given in a block. For example:
   #
   #   # No 'Winter' tag exists
   #   winter = Tag.find_or_initialize_by_name(&quot;Winter&quot;)
@@ -724,8 +724,7 @@ module ActiveRecord #:nodoc:
       # ==== Attributes
       #
       # * +updates+ - A String of column and value pairs that will be set on any records that match conditions.
-      # * +conditions+ - An SQL fragment like &quot;administrator = 1&quot; or [ &quot;user_name = ?&quot;, username ].
-      #   See conditions in the intro for more info.
+      # * +conditions+ - An SQL fragment like &quot;administrator = 1&quot; or [ &quot;user_name = ?&quot;, username ]. See conditions in the intro for more info.
       # * +options+ - Additional options are &lt;tt&gt;:limit&lt;/tt&gt; and/or &lt;tt&gt;:order&lt;/tt&gt;, see the examples for usage.
       #
       # ==== Examples</diff>
      <filename>activerecord/lib/active_record/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -50,7 +50,7 @@ module ActiveRecord
   #
   # == Inheritable callback queues
   #
-  # Besides the overwriteable callback methods, it's also possible to register callbacks through the use of the callback macros.
+  # Besides the overwritable callback methods, it's also possible to register callbacks through the use of the callback macros.
   # Their main advantage is that the macros add behavior into a callback queue that is kept intact down through an inheritance
   # hierarchy. Example:
   #</diff>
      <filename>activerecord/lib/active_record/callbacks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -383,7 +383,7 @@ module ActiveRecord
 
       def add_column_options!(sql, options) #:nodoc:
         sql &lt;&lt; &quot; DEFAULT #{quote(options[:default], options[:column])}&quot; if options_include_default?(options)
-        # must explcitly check for :null to allow change_column to work on migrations
+        # must explicitly check for :null to allow change_column to work on migrations
         if options.has_key? :null
           if options[:null] == false
             sql &lt;&lt; &quot; NOT NULL&quot;</diff>
      <filename>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb</filename>
    </modified>
    <modified>
      <diff>@@ -867,7 +867,7 @@ module ActiveRecord
         end
 
       private
-        # The internal PostgreSQL identifer of the money data type.
+        # The internal PostgreSQL identifier of the money data type.
         MONEY_COLUMN_TYPE_OID = 790 #:nodoc:
 
         # Connects to a PostgreSQL server and sets up the adapter depending on the</diff>
      <filename>activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -62,7 +62,7 @@ module ActiveRecord
       changed_attributes.keys
     end
 
-    # Map of changed attrs =&gt; [original value, new value]
+    # Map of changed attrs =&gt; [original value, new value].
     #   person.changes # =&gt; {}
     #   person.name = 'bob'
     #   person.changes # =&gt; { 'name' =&gt; ['bill', 'bob'] }
@@ -93,27 +93,27 @@ module ActiveRecord
     end
 
     private
-      # Map of change attr =&gt; original value.
+      # Map of change &lt;tt&gt;attr =&gt; original value&lt;/tt&gt;.
       def changed_attributes
         @changed_attributes ||= {}
       end
 
-      # Handle *_changed? for method_missing.
+      # Handle &lt;tt&gt;*_changed?&lt;/tt&gt; for +method_missing+.
       def attribute_changed?(attr)
         changed_attributes.include?(attr)
       end
 
-      # Handle *_change for method_missing.
+      # Handle &lt;tt&gt;*_change&lt;/tt&gt; for +method_missing+.
       def attribute_change(attr)
         [changed_attributes[attr], __send__(attr)] if attribute_changed?(attr)
       end
 
-      # Handle *_was for method_missing.
+      # Handle &lt;tt&gt;*_was&lt;/tt&gt; for +method_missing+.
       def attribute_was(attr)
         attribute_changed?(attr) ? changed_attributes[attr] : __send__(attr)
       end
 
-      # Handle *_will_change! for method_missing.
+      # Handle &lt;tt&gt;*_will_change!&lt;/tt&gt; for +method_missing+.
       def attribute_will_change!(attr)
         changed_attributes[attr] = clone_attribute_value(:read_attribute, attr)
       end</diff>
      <filename>activerecord/lib/active_record/dirty.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module ActiveRecord
-  # Raised by save! and create! when the record is invalid.  Use the
+  # Raised by &lt;tt&gt;save!&lt;/tt&gt; and &lt;tt&gt;create!&lt;/tt&gt; when the record is invalid.  Use the
   # +record+ method to retrieve the record which did not validate.
   #   begin
   #     complex_operation_that_calls_save!_internally
@@ -52,7 +52,7 @@ module ActiveRecord
     # Adds an error to the base object instead of any particular attribute. This is used
     # to report errors that don't tie to any specific attribute, but rather to the object
     # as a whole. These error messages don't get prepended with any field name when iterating
-    # with each_full, so they should be complete sentences.
+    # with +each_full+, so they should be complete sentences.
     def add_to_base(msg)
       add(:base, msg)
     end
@@ -97,7 +97,7 @@ module ActiveRecord
       !@errors[attribute.to_s].nil?
     end
 
-    # Returns nil, if no errors are associated with the specified +attribute+.
+    # Returns +nil+, if no errors are associated with the specified +attribute+.
     # Returns the error message, if one error is associated with the specified +attribute+.
     # Returns an array of error messages, if more than one error is associated with the specified +attribute+.
     #
@@ -118,7 +118,7 @@ module ActiveRecord
 
     alias :[] :on
 
-    # Returns errors assigned to the base object through add_to_base according to the normal rules of on(attribute).
+    # Returns errors assigned to the base object through +add_to_base+ according to the normal rules of &lt;tt&gt;on(attribute)&lt;/tt&gt;.
     def on_base
       on(:base)
     end
@@ -131,15 +131,15 @@ module ActiveRecord
     #   end
     #
     #   company = Company.create(:address =&gt; '123 First St.')
-    #   company.errors.each{|attr,msg| puts &quot;#{attr} - #{msg}&quot; } # =&gt;
-    #     name - is too short (minimum is 5 characters)
-    #     name - can't be blank
-    #     address - can't be blank
+    #   company.errors.each{|attr,msg| puts &quot;#{attr} - #{msg}&quot; }
+    #   # =&gt; name - is too short (minimum is 5 characters)
+    #   #    name - can't be blank
+    #   #    address - can't be blank
     def each
       @errors.each_key { |attr| @errors[attr].each { |msg| yield attr, msg } }
     end
 
-    # Yields each full error message added. So Person.errors.add(&quot;first_name&quot;, &quot;can't be empty&quot;) will be returned
+    # Yields each full error message added. So &lt;tt&gt;Person.errors.add(&quot;first_name&quot;, &quot;can't be empty&quot;)&lt;/tt&gt; will be returned
     # through iteration as &quot;First name can't be empty&quot;.
     #
     #   class Company &lt; ActiveRecord::Base
@@ -148,10 +148,10 @@ module ActiveRecord
     #   end
     #
     #   company = Company.create(:address =&gt; '123 First St.')
-    #   company.errors.each_full{|msg| puts msg } # =&gt;
-    #     Name is too short (minimum is 5 characters)
-    #     Name can't be blank
-    #     Address can't be blank
+    #   company.errors.each_full{|msg| puts msg }
+    #   # =&gt; Name is too short (minimum is 5 characters)
+    #   #    Name can't be blank
+    #   #    Address can't be blank
     def each_full
       full_messages.each { |msg| yield msg }
     end
@@ -164,8 +164,8 @@ module ActiveRecord
     #   end
     #
     #   company = Company.create(:address =&gt; '123 First St.')
-    #   company.errors.full_messages # =&gt;
-    #     [&quot;Name is too short (minimum is 5 characters)&quot;, &quot;Name can't be blank&quot;, &quot;Address can't be blank&quot;]
+    #   company.errors.full_messages
+    #   # =&gt; [&quot;Name is too short (minimum is 5 characters)&quot;, &quot;Name can't be blank&quot;, &quot;Address can't be blank&quot;]
     def full_messages
       full_messages = []
 
@@ -209,13 +209,13 @@ module ActiveRecord
     #   end
     #
     #   company = Company.create(:address =&gt; '123 First St.')
-    #   company.errors.to_xml # =&gt;
-    #     &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-    #     &lt;errors&gt;
-    #       &lt;error&gt;Name is too short (minimum is 5 characters)&lt;/error&gt;
-    #       &lt;error&gt;Name can't be blank&lt;/error&gt;
-    #       &lt;error&gt;Address can't be blank&lt;/error&gt;
-    #     &lt;/errors&gt;
+    #   company.errors.to_xml
+    #   # =&gt;  &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+    #   #     &lt;errors&gt;
+    #   #       &lt;error&gt;Name is too short (minimum is 5 characters)&lt;/error&gt;
+    #   #       &lt;error&gt;Name can't be blank&lt;/error&gt;
+    #   #       &lt;error&gt;Address can't be blank&lt;/error&gt;
+    #   #     &lt;/errors&gt;
     def to_xml(options={})
       options[:root] ||= &quot;errors&quot;
       options[:indent] ||= 2
@@ -261,7 +261,7 @@ module ActiveRecord
   #   person.errors.on &quot;phone_number&quot;     # =&gt; &quot;has invalid format&quot;
   #   person.errors.each_full { |msg| puts msg }
   #                                       # =&gt; &quot;Last name can't be empty\n&quot; +
-  #                                            &quot;Phone number has invalid format&quot;
+  #                                       #    &quot;Phone number has invalid format&quot;
   #
   #   person.attributes = { &quot;last_name&quot; =&gt; &quot;Heinemeier&quot;, &quot;phone_number&quot; =&gt; &quot;555-555&quot; }
   #   person.save # =&gt; true (and person is now saved in the database)
@@ -300,7 +300,7 @@ module ActiveRecord
                                   :odd =&gt; 'odd?', :even =&gt; 'even?' }.freeze
 
       # Adds a validation method or block to the class. This is useful when
-      # overriding the +validate+ instance method becomes too unwieldly and
+      # overriding the +validate+ instance method becomes too unwieldy and
       # you're looking for more descriptive declaration of your validations.
       #
       # This can be done with a symbol pointing to a method:</diff>
      <filename>activerecord/lib/active_record/validations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ lifecycle methods that operate against a persistent store.
    Person.exists?(1)  #=&gt; true
 
 As you can see, the methods are quite similar to Active Record's methods for dealing with database
-records.  But rather than dealing with 
+records.  But rather than dealing directly with a database record, you're dealing with HTTP resources (which may or may not be database records).
 
 ==== Protocol
 </diff>
      <filename>activeresource/README</filename>
    </modified>
    <modified>
      <diff>@@ -111,7 +111,7 @@ module ActiveResource
   # over HTTPS.
   # 
   # Note: Some values cannot be provided in the URL passed to site.  e.g. email addresses 
-  # as usernames.  In those situations you should use the seperate user and password option.
+  # as usernames.  In those situations you should use the separate user and password option.
   # == Errors &amp; Validation
   #
   # Error handling and validation is handled in much the same manner as you're used to seeing in
@@ -200,7 +200,7 @@ module ActiveResource
     cattr_accessor :logger
 
     class &lt;&lt; self
-      # Gets the URI of the REST resources to map for this class.  The site variable is required 
+      # Gets the URI of the REST resources to map for this class.  The site variable is required for
       # Active Resource's mapping to work.
       def site
         # Not using superclass_delegating_reader because don't want subclasses to modify superclass instance
@@ -226,7 +226,7 @@ module ActiveResource
       end
 
       # Sets the URI of the REST resources to map for this class to the value in the +site+ argument.
-      # The site variable is required Active Resource's mapping to work.
+      # The site variable is required for Active Resource's mapping to work.
       def site=(site)
         @connection = nil
         if site.nil?
@@ -288,7 +288,7 @@ module ActiveResource
       end
 
       # Returns the current format, default is ActiveResource::Formats::XmlFormat.
-      def format # :nodoc:
+      def format
         read_inheritable_attribute(&quot;format&quot;) || ActiveResource::Formats[:xml]
       end
 
@@ -298,7 +298,7 @@ module ActiveResource
         @timeout = timeout
       end
 
-      # Gets tthe number of seconds after which requests to the REST API should time out.
+      # Gets the number of seconds after which requests to the REST API should time out.
       def timeout
         if defined?(@timeout)
           @timeout
@@ -426,16 +426,16 @@ module ActiveResource
 
       alias_method :set_primary_key, :primary_key=  #:nodoc:
 
-      # Create a new resource instance and request to the remote service
+      # Creates a new resource instance and makes a request to the remote service
       # that it be saved, making it equivalent to the following simultaneous calls:
       #
       #   ryan = Person.new(:first =&gt; 'ryan')
       #   ryan.save
       #
-      # The newly created resource is returned.  If a failure has occurred an
-      # exception will be raised (see save).  If the resource is invalid and
-      # has not been saved then valid? will return &lt;tt&gt;false&lt;/tt&gt;,
-      # while new? will still return &lt;tt&gt;true&lt;/tt&gt;.
+      # Returns the newly created resource.  If a failure has occurred an
+      # exception will be raised (see &lt;tt&gt;save&lt;/tt&gt;).  If the resource is invalid and
+      # has not been saved then &lt;tt&gt;valid?&lt;/tt&gt; will return &lt;tt&gt;false&lt;/tt&gt;,
+      # while &lt;tt&gt;new?&lt;/tt&gt; will still return &lt;tt&gt;true&lt;/tt&gt;.
       #
       # ==== Examples
       #   Person.create(:name =&gt; 'Jeremy', :email =&gt; 'myname@nospam.com', :enabled =&gt; true)
@@ -812,7 +812,7 @@ module ActiveResource
     #   Person.delete(guys_id)
     #   that_guy.exists? # =&gt; false
     def exists?
-      !new? &amp;&amp; self.class.exists?(to_param, :params =&gt; prefix_options)      
+      !new? &amp;&amp; self.class.exists?(to_param, :params =&gt; prefix_options)
     end
 
     # A method to convert the the resource to an XML string.</diff>
      <filename>activeresource/lib/active_resource/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,8 +48,8 @@ module ActiveResource
           #   # =&gt; [{:id =&gt; 1, :name =&gt; 'Ryan'}]
           #
           # Note: the objects returned from this method are not automatically converted
-          # into Active Resource instances - they are ordinary Hashes. If you are expecting
-          # Active Resource instances, use the &lt;tt&gt;find&lt;/tt&gt; class method with the
+          # into ActiveResource::Base instances - they are ordinary Hashes. If you are expecting
+          # ActiveResource::Base instances, use the &lt;tt&gt;find&lt;/tt&gt; class method with the
           # &lt;tt&gt;:from&lt;/tt&gt; option. For example:
           #
           #   Person.find(:all, :from =&gt; :active)</diff>
      <filename>activeresource/lib/active_resource/custom_methods.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ module ActiveResource
     class &lt;&lt; self
 
       # Returns an array of all request objects that have been sent to the mock.  You can use this to check
-      # wether or not your model actually sent an HTTP request.
+      # if your model actually sent an HTTP request.
       #
       # ==== Example
       #   def setup</diff>
      <filename>activeresource/lib/active_resource/http_mock.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ module ActiveSupport #:nodoc:
             # This emits the number without any scientific notation.
             # I prefer it to using self.to_f.to_s, which would lose precision.
             #
-            # Note that YAML allows that when reconsituting floats
+            # Note that YAML allows that when reconstituting floats
             # to native types, some precision may get lost.
             # There is no full precision real YAML tag that I am aware of.
             str = self.to_s</diff>
      <filename>activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ module ActiveSupport #:nodoc:
           clone.except!(*keys)
         end
 
-        # Replaces the hash without only the given keys.
+        # Replaces the hash without the given keys.
         def except!(*keys)
           keys.map! { |key| convert_key(key) } if respond_to?(:convert_key)
           keys.each { |key| delete(key) }</diff>
      <filename>activesupport/lib/active_support/core_ext/hash/except.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,28 @@
 module ActiveSupport #:nodoc:
   module CoreExtensions #:nodoc:
     module Hash #:nodoc:
-      # Allows for reverse merging where its the keys in the calling hash that wins over those in the &lt;tt&gt;other_hash&lt;/tt&gt;.
-      # This is particularly useful for initializing an incoming option hash with default values:
+      # Allows for reverse merging two hashes where the keys in the calling hash take precedence over those
+      # in the &lt;tt&gt;other_hash&lt;/tt&gt;. This is particularly useful for initializing an option hash with default values:
       #
       #   def setup(options = {})
       #     options.reverse_merge! :size =&gt; 25, :velocity =&gt; 10
       #   end
       #
-      # The default &lt;tt&gt;:size&lt;/tt&gt; and &lt;tt&gt;:velocity&lt;/tt&gt; is only set if the +options+ passed in doesn't already have those keys set.
+      # Using &lt;tt&gt;merge&lt;/tt&gt;, the above example would look as follows:
+      #
+      #   def setup(options = {})
+      #     { :size =&gt; 25, :velocity =&gt; 10 }.merge(options)
+      #   end
+      #
+      # The default &lt;tt&gt;:size&lt;/tt&gt; and &lt;tt&gt;:velocity&lt;/tt&gt; are only set if the +options+ hash passed in doesn't already
+      # have the respective key.
       module ReverseMerge
-        # Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second.
+        # Performs the opposite of &lt;tt&gt;merge&lt;/tt&gt;, with the keys and values from the first hash taking precedence over the second.
         def reverse_merge(other_hash)
           other_hash.merge(self)
         end
 
-        # Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second.
+        # Performs the opposite of &lt;tt&gt;merge&lt;/tt&gt;, with the keys and values from the first hash taking precedence over the second.
         # Modifies the receiver in place.
         def reverse_merge!(other_hash)
           replace(reverse_merge(other_hash))</diff>
      <filename>activesupport/lib/active_support/core_ext/hash/reverse_merge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,8 +24,8 @@ module ActiveSupport #:nodoc:
         #
         #   &quot;posts&quot;.singularize            # =&gt; &quot;post&quot;
         #   &quot;octopi&quot;.singularize           # =&gt; &quot;octopus&quot;
-        #   &quot;sheep&quot;.singluarize            # =&gt; &quot;sheep&quot;
-        #   &quot;word&quot;.singluarize             # =&gt; &quot;word&quot;
+        #   &quot;sheep&quot;.singularize            # =&gt; &quot;sheep&quot;
+        #   &quot;word&quot;.singularize             # =&gt; &quot;word&quot;
         #   &quot;the blue mailmen&quot;.singularize # =&gt; &quot;the blue mailman&quot;
         #   &quot;CamelOctopi&quot;.singularize      # =&gt; &quot;CamelOctopus&quot;
         def singularize</diff>
      <filename>activesupport/lib/active_support/core_ext/string/inflections.rb</filename>
    </modified>
    <modified>
      <diff>@@ -261,7 +261,7 @@ module ActiveSupport #:nodoc:
         # Layers additional behavior on Time#&lt;=&gt; so that DateTime and ActiveSupport::TimeWithZone instances
         # can be chronologically compared with a Time
         def compare_with_coercion(other)
-          # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do &lt;=&gt; comparision
+          # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do &lt;=&gt; comparison
           other = other.comparable_time if other.respond_to?(:comparable_time)
           if other.acts_like?(:date)
             # other is a Date/DateTime, so coerce self #to_datetime and hand off to DateTime#&lt;=&gt;</diff>
      <filename>activesupport/lib/active_support/core_ext/time/calculations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module ActiveSupport
-  # If true, use ISO 8601 format for dates and times.  Otherwise, fall back to the Active Support legacy format.
+  # If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format.
   mattr_accessor :use_standard_json_time_format
 
   class &lt;&lt; self</diff>
      <filename>activesupport/lib/active_support/json.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,14 @@
 class Date
-  # Returns a JSON string representing the date.
+  # Returns a JSON string representing the date. If ActiveSupport.use_standard_json_time_format is set to true, the
+  # ISO 8601 format is used.
   #
-  # ==== Example:
+  # ==== Examples:
+  #
+  #   # With ActiveSupport.use_standard_json_time_format = true
+  #   Date.new(2005,2,1).to_json
+  #   # =&gt; &quot;2005-02-01&quot;
+  #
+  #   # With ActiveSupport.use_standard_json_time_format = false
   #   Date.new(2005,2,1).to_json
   #   # =&gt; &quot;2005/02/01&quot;
   def to_json(options = nil)</diff>
      <filename>activesupport/lib/active_support/json/encoders/date.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,14 @@
 class DateTime
-  # Returns a JSON string representing the datetime.
+  # Returns a JSON string representing the datetime. If ActiveSupport.use_standard_json_time_format is set to true, the
+  # ISO 8601 format is used.
   #
-  # ==== Example:
+  # ==== Examples:
+  #
+  #   # With ActiveSupport.use_standard_json_time_format = true
+  #   DateTime.civil(2005,2,1,15,15,10).to_json
+  #   # =&gt; &quot;2005-02-01T15:15:10+00:00&quot;
+  #
+  #   # With ActiveSupport.use_standard_json_time_format = false
   #   DateTime.civil(2005,2,1,15,15,10).to_json
   #   # =&gt; &quot;2005/02/01 15:15:10 +0000&quot;
   def to_json(options = nil)</diff>
      <filename>activesupport/lib/active_support/json/encoders/date_time.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,16 @@
 class Time
-  # Returns a JSON string representing the time.
+  # Returns a JSON string representing the time. If ActiveSupport.use_standard_json_time_format is set to true, the
+  # ISO 8601 format is used.
   #
-  # ==== Example:
+  # ==== Examples:
+  #
+  #   # With ActiveSupport.use_standard_json_time_format = true
+  #   Time.utc(2005,2,1,15,15,10).to_json
+  #   # =&gt; &quot;2005-02-01T15:15:10Z&quot;
+  #
+  #   # With ActiveSupport.use_standard_json_time_format = false
   #   Time.utc(2005,2,1,15,15,10).to_json
-  #   # =&gt; 2005/02/01 15:15:10 +0000&quot;
+  #   # =&gt; &quot;2005/02/01 15:15:10 +0000&quot;
   def to_json(options = nil)
     if ActiveSupport.use_standard_json_time_format
       xmlschema.inspect</diff>
      <filename>activesupport/lib/active_support/json/encoders/time.rb</filename>
    </modified>
    <modified>
      <diff>@@ -102,7 +102,19 @@ module ActiveSupport
       &quot;#{time.strftime(&quot;%Y-%m-%dT%H:%M:%S&quot;)}#{formatted_offset(true, 'Z')}&quot;
     end
     alias_method :iso8601, :xmlschema
-  
+
+    # Returns a JSON string representing the TimeWithZone. If ActiveSupport.use_standard_json_time_format is set to
+    # true, the ISO 8601 format is used.
+    #
+    # ==== Examples:
+    #
+    #   # With ActiveSupport.use_standard_json_time_format = true
+    #   Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
+    #   # =&gt; &quot;2005-02-01T15:15:10Z&quot;
+    #
+    #   # With ActiveSupport.use_standard_json_time_format = false
+    #   Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
+    #   # =&gt; &quot;2005/02/01 15:15:10 +0000&quot;
     def to_json(options = nil)
       if ActiveSupport.use_standard_json_time_format
         xmlschema.inspect</diff>
      <filename>activesupport/lib/active_support/time_with_zone.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ module Builder
   # markup.
   #
   # Usage:
-  #   xe = Builder::XmlEvents.new(hander)
+  #   xe = Builder::XmlEvents.new(handler)
   #   xe.title(&quot;HI&quot;)    # Sends start_tag/end_tag/text messages to the handler.
   #
   # Indentation may also be selected by providing value for the</diff>
      <filename>activesupport/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,7 +119,7 @@ class MemCache
   # Valid options for +opts+ are:
   #
   #   [:namespace]   Prepends this value to all keys added or retrieved.
-  #   [:readonly]    Raises an exeception on cache writes when true.
+  #   [:readonly]    Raises an exception on cache writes when true.
   #   [:multithread] Wraps cache access in a Mutex for thread safety.
   #
   # Other options are ignored.
@@ -207,7 +207,7 @@ class MemCache
   end
 
   ##
-  # Deceremets the value for +key+ by +amount+ and returns the new value.
+  # Decrements the value for +key+ by +amount+ and returns the new value.
   # +key+ must already exist.  If +key+ is not an integer, it is assumed to be
   # 0.  +key+ can not be decremented below 0.
 </diff>
      <filename>activesupport/lib/active_support/vendor/memcache-client-1.5.0/memcache.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@ module TZInfo
     
     # Returns the set of TimezonePeriod instances that are valid for the given
     # local time as an array. If you just want a single period, use 
-    # period_for_local instead and specify how abiguities should be resolved.
+    # period_for_local instead and specify how ambiguities should be resolved.
     # Raises PeriodNotFound if no periods are found for the given time.
     def periods_for_local(local)
       info.periods_for_local(local)</diff>
      <filename>activesupport/lib/active_support/vendor/tzinfo-0.3.9/tzinfo/data_timezone.rb</filename>
    </modified>
    <modified>
      <diff>@@ -66,7 +66,7 @@ module TZInfo
     # ArgumentError will be raised if a transition is added out of order.
     # offset_id refers to an id defined with offset. ArgumentError will be 
     # raised if the offset_id cannot be found. numerator_or_time and
-    # denomiator specify the time the transition occurs as. See 
+    # denominator specify the time the transition occurs as. See
     # TimezoneTransitionInfo for more detail about specifying times.
     def transition(year, month, offset_id, numerator_or_time, denominator = nil)
       offset = @offsets[offset_id]      </diff>
      <filename>activesupport/lib/active_support/vendor/tzinfo-0.3.9/tzinfo/data_timezone_info.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,7 +36,7 @@ module TZInfo
     
     # Returns the set of TimezonePeriod instances that are valid for the given
     # local time as an array. If you just want a single period, use 
-    # period_for_local instead and specify how abiguities should be resolved.
+    # period_for_local instead and specify how ambiguities should be resolved.
     # Raises PeriodNotFound if no periods are found for the given time.
     def periods_for_local(local)
       @linked_timezone.periods_for_local(local)</diff>
      <filename>activesupport/lib/active_support/vendor/tzinfo-0.3.9/tzinfo/linked_timezone.rb</filename>
    </modified>
    <modified>
      <diff>@@ -121,7 +121,7 @@ module TZInfo
       TimezoneProxy.new(identifier)
     end
     
-    # If identifier is nil calls super(), otherwise calls get. An identfier 
+    # If identifier is nil calls super(), otherwise calls get. An identifier
     # should always be passed in when called externally.
     def self.new(identifier = nil)
       if identifier        </diff>
      <filename>activesupport/lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ module TZInfo
     attr_reader :numerator_or_time
     protected :numerator_or_time
     
-    # Either the denominotor of the DateTime if the transition time is defined
+    # Either the denominator of the DateTime if the transition time is defined
     # as a DateTime, otherwise nil. 
     attr_reader :denominator
     protected :denominator</diff>
      <filename>activesupport/lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone_transition_info.rb</filename>
    </modified>
    <modified>
      <diff>@@ -121,7 +121,7 @@ class XmlSimple
   # Create a &quot;global&quot; cache.
   @@cache = Cache.new
 
-  # Creates and intializes a new XmlSimple object.
+  # Creates and initializes a new XmlSimple object.
   # 
   # defaults::
   #   Default values for options.
@@ -497,7 +497,7 @@ class XmlSimple
       }
     end
     
-    # Fold Hases containing a single anonymous Array up into just the Array.
+    # Fold Hashes containing a single anonymous Array up into just the Array.
     if count == 1 
       anonymoustag = @options['anonymoustag']
       if result.has_key?(anonymoustag) &amp;&amp; result[anonymoustag].instance_of?(Array)
@@ -907,7 +907,7 @@ class XmlSimple
   # Thanks to Norbert Gawor for a bugfix.
   #
   # value::
-  #   Value to be checked for emptyness.
+  #   Value to be checked for emptiness.
   def empty(value)
     case value
       when Hash</diff>
      <filename>activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb</filename>
    </modified>
    <modified>
      <diff>@@ -66,9 +66,9 @@ class MongrelSpawner &lt; Spawner
       &quot;-l #{OPTIONS[:rails_root]}/log/mongrel.log&quot;
 
     # Add prefix functionality to spawner's call to mongrel_rails
-    # Digging through monrel's project subversion server, the earliest
+    # Digging through mongrel's project subversion server, the earliest
     # Tag that has prefix implemented in the bin/mongrel_rails file
-    # is 0.3.15 which also happens to be the earilest tag listed.
+    # is 0.3.15 which also happens to be the earliest tag listed.
     # References: http://mongrel.rubyforge.org/svn/tags
     if Mongrel::Const::MONGREL_VERSION.to_f &gt;=0.3 &amp;&amp; !OPTIONS[:prefix].nil?
       cmd = cmd + &quot; --prefix #{OPTIONS[:prefix]}&quot;</diff>
      <filename>railties/lib/commands/process/spawner.rb</filename>
    </modified>
    <modified>
      <diff>@@ -98,7 +98,7 @@ module Rails
     #   Rails::Initializer.run(:set_load_path)
     #
     # This is useful if you only want the load path initialized, without
-    # incuring the overhead of completely loading the entire environment.
+    # incurring the overhead of completely loading the entire environment.
     def self.run(command = :process, configuration = Configuration.new)
       yield configuration if block_given?
       initializer = new configuration
@@ -531,7 +531,7 @@ Run `rake gems:install` to install the missing gems.
     # A stub for setting options on ActiveRecord::Base.
     attr_accessor :active_record
 
-    # A stub for setting options on ActiveRecord::Base.
+    # A stub for setting options on ActiveResource::Base.
     attr_accessor :active_resource
 
     # A stub for setting options on ActiveSupport.</diff>
      <filename>railties/lib/initializer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,11 @@
 Description:
     Scaffolds an entire resource, from model and migration to controller and
     views, along with a full test suite. The resource is ready to use as a
-    starting point for your restful, resource-oriented application.
+    starting point for your RESTful, resource-oriented application.
 
-    Pass the name of the model, either CamelCased or under_scored, as the first
-    argument, and an optional list of attribute pairs.
+    Pass the name of the model (in singular form), either CamelCased or
+    under_scored, as the first argument, and an optional list of attribute
+    pairs.
 
     Attribute pairs are column_name:sql_type arguments specifying the
     model's attributes. Timestamps are added by default, so you don't have to
@@ -13,13 +14,16 @@ Description:
     You don't have to think up every attribute up front, but it helps to
     sketch out a few so you can start working with the resource immediately.
 
-    For example, `scaffold post title:string body:text published:boolean`
+    For example, 'scaffold post title:string body:text published:boolean'
     gives you a model with those three attributes, a controller that handles
     the create/show/update/destroy, forms to create and edit your posts, and
     an index that lists them all, as well as a map.resources :posts
     declaration in config/routes.rb.
 
+    If you want to remove all the generated files, run
+    'script/destroy scaffold ModelName'.
+
 Examples:
-    `./script/generate scaffold post` # no attributes, view will be anemic
+    `./script/generate scaffold post`
     `./script/generate scaffold post title:string body:text published:boolean`
     `./script/generate scaffold purchase order_id:integer amount:decimal`</diff>
      <filename>railties/lib/rails_generator/generators/components/scaffold/USAGE</filename>
    </modified>
    <modified>
      <diff>@@ -45,7 +45,7 @@ module Rails
             usage = &quot;\nInstalled Generators\n&quot;
             Rails::Generator::Base.sources.inject([]) do |mem, source|
               # Using an association list instead of a hash to preserve order,
-              # for esthetic reasons more than anything else.
+              # for aesthetic reasons more than anything else.
               label = source.label.to_s.capitalize
               pair = mem.assoc(label)
               mem &lt;&lt; (pair = [label, []]) if pair.nil?</diff>
      <filename>railties/lib/rails_generator/scripts.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../scripts'
 module Rails::Generator::Scripts
   class Destroy &lt; Base
     mandatory_options :command =&gt; :destroy
-    
+
     protected
     def usage_message
       usage = &quot;\nInstalled Generators\n&quot;
@@ -15,14 +15,13 @@ module Rails::Generator::Scripts
 
       usage &lt;&lt; &lt;&lt;end_blurb
 
-This script will destroy all files created by the corresponding 
-script/generate command. For instance, script/destroy migration CreatePost
-will delete the appropriate ###_create_post.rb file in db/migrate, while 
-script/destroy scaffold Post will delete the posts controller and 
+script/generate command. For instance, 'script/destroy migration CreatePost'
+will delete the appropriate XXX_create_post.rb migration file in db/migrate,
+while 'script/destroy scaffold Post' will delete the posts controller and
 views, post model and migration, all associated tests, and the map.resources
 :posts line in config/routes.rb.
-      
-For instructions on finding new generators, run script/generate
+
+For instructions on finding new generators, run script/generate.
 end_blurb
       return usage
     end</diff>
      <filename>railties/lib/rails_generator/scripts/destroy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,7 +23,7 @@ module Rails
 
     # Generate a random secret key by using the Win32 API. Raises LoadError
     # if the current platform cannot make use of the Win32 API. Raises
-    # SystemCallError if some other error occured.
+    # SystemCallError if some other error occurred.
     def generate_secret_with_win32_api
       # Following code is based on David Garamond's GUID library for Ruby.
       require 'Win32API'</diff>
      <filename>railties/lib/rails_generator/secret_key_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -226,7 +226,7 @@ class GeneratorTestCase &lt; Test::Unit::TestCase
     end
   end
 
-  # Asserts that the given fixtures yaml file was generated.
+  # Asserts that the given fixtures YAML file was generated.
   # It takes a fixture name without the &lt;tt&gt;.yml&lt;/tt&gt; part.
   # The parsed YAML tree is passed to a block.
   def assert_generated_fixtures_for(name)</diff>
      <filename>railties/test/generators/generator_test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f7d08acd5e0650658383e3d3f86d6ff5b49e9030</id>
    </parent>
  </parents>
  <author>
    <name>Pratik Naik</name>
    <email>pratiknaik@gmail.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/0432d151647f2178ddee79979827d552447c251f</url>
  <id>0432d151647f2178ddee79979827d552447c251f</id>
  <committed-date>2008-07-16T05:01:23-07:00</committed-date>
  <authored-date>2008-07-16T05:00:36-07:00</authored-date>
  <message>Merge with docrails.</message>
  <tree>7c772cd260eb051cd7b80cf91468555f03db9e11</tree>
  <committer>
    <name>Pratik Naik</name>
    <email>pratiknaik@gmail.com</email>
  </committer>
</commit>
