From 4b95405818fee8a07ff0995229eed7d759422dc4 Mon Sep 17 00:00:00 2001
From: Mikhail Dieterle <MikDiet@gmail.com>
Date: Sat, 22 Feb 2014 21:57:11 +0300
Subject: typos fixes

---
 guides/source/4_1_release_notes.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md
index a859553b1b..69ac442c9d 100644
--- a/guides/source/4_1_release_notes.md
+++ b/guides/source/4_1_release_notes.md
@@ -457,10 +457,10 @@ for detailed changes.
 
 ### Notable changes
 
-* Default scopes are no longer overriden by chained conditions.
+* Default scopes are no longer overridden by chained conditions.
 
   Before this change when you defined a `default_scope` in a model
-  it was overriden by chained conditions in the same field. Now it
+  it was overridden by chained conditions in the same field. Now it
   is merged like any other scope. [More Details](upgrading_ruby_on_rails.html#changes-on-default-scopes).
 
 * Added `ActiveRecord::Base.to_param` for convenient "pretty" URLs derived from
@@ -547,10 +547,10 @@ for detailed changes.
   3.8.0`. ([Pull Request](https://github.com/rails/rails/pull/13350))
 
 * Make `change_column_null`
-  revertable. ([Commit](https://github.com/rails/rails/commit/724509a9d5322ff502aefa90dd282ba33a281a96))
+  revertible. ([Commit](https://github.com/rails/rails/commit/724509a9d5322ff502aefa90dd282ba33a281a96))
 
 * Added a flag to disable schema dump after migration. This is set to `false`
-  by defualt in the production environment for new applications. ([Pull Request](https://github.com/rails/rails/pull/13948))
+  by default in the production environment for new applications. ([Pull Request](https://github.com/rails/rails/pull/13948))
 
 
 Active Model
-- 
cgit v1.2.3


From b91d76131b2dd5fbd4d73f6e1e925c9e6f9880f6 Mon Sep 17 00:00:00 2001
From: Gaurish Sharma <contact@gaurishsharma.com>
Date: Sun, 23 Feb 2014 12:35:53 +0530
Subject: Tweak Configuring Guide language

the fact that Rails is multi-thread by default is not very relevant. see https://github.com/rails/rails/pull/13998 [ci skip]
---
 guides/source/configuring.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index 7b72e27b96..a88591e89c 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -939,4 +939,4 @@ ActiveRecord::ConnectionTimeoutError - could not obtain a database connection wi
 If you get the above error, you might want to increase the size of connection
 pool by incrementing the `pool` option in `database.yml`
 
-NOTE. As Rails is multi-threaded by default, there could be a chance that several threads may be accessing multiple connections simultaneously. So depending on your current request load, you could very well have multiple threads contending for a limited amount of connections.
+NOTE. If you are running in a multi-threaded environment, there could be a chance that several threads may be accessing multiple connections simultaneously. So depending on your current request load, you could very well have multiple threads contending for a limited amount of connections.
-- 
cgit v1.2.3


From f302079d97b5c139b56f1acd2d516be52351c4fe Mon Sep 17 00:00:00 2001
From: Zachary Scott <zachary@zacharyscott.net>
Date: Sun, 23 Feb 2014 20:19:15 +1100
Subject: :scissors:

This commit also addresses rails/docrails#169 and rails/rails#14159
---
 actionmailer/README.rdoc                             | 2 +-
 actionmailer/lib/action_mailer/base.rb               | 2 +-
 actionpack/lib/action_dispatch/middleware/cookies.rb | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/actionmailer/README.rdoc b/actionmailer/README.rdoc
index e425282fa8..67b64fe469 100644
--- a/actionmailer/README.rdoc
+++ b/actionmailer/README.rdoc
@@ -102,7 +102,7 @@ Example:
       )
 
       if email.has_attachments?
-        email.attachments.each do |attachment| 
+        email.attachments.each do |attachment|
           page.attachments.create({
             file: attachment, description: email.subject
           })
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 18a41ba7a4..951a3e5fb5 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -94,7 +94,7 @@ module ActionMailer
   #   Hi <%= @account.name %>,
   #   Thanks for joining our service! Please check back often.
   #
-  # You can even use Action Pack helpers in these views. For example:
+  # You can even use Action View helpers in these views. For example:
   #
   #   You got a new note!
   #   <%= truncate(@note.body, length: 25) %>
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb
index 18e64704f6..8b05cd6e11 100644
--- a/actionpack/lib/action_dispatch/middleware/cookies.rb
+++ b/actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -74,7 +74,7 @@ module ActionDispatch
   #
   #     domain: nil  # Does not sets cookie domain. (default)
   #     domain: :all # Allow the cookie for the top most level
-  #                       domain and subdomains.
+  #                  # domain and subdomains.
   #
   # * <tt>:expires</tt> - The time at which this cookie expires, as a \Time object.
   # * <tt>:secure</tt> - Whether this cookie is only transmitted to HTTPS servers.
-- 
cgit v1.2.3


From 42417b0013819e573be9ffc5402e179003156e8e Mon Sep 17 00:00:00 2001
From: Hendy Tanata <htanata@gmail.com>
Date: Thu, 27 Feb 2014 19:31:08 -0800
Subject: Improve guide for Hash#transform_keys and related methods.

[skip ci]
---
 guides/source/active_support_core_extensions.md | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 2ad09f599b..7e6cda4b26 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -2719,11 +2719,14 @@ The method `transform_keys` accepts a block and returns a hash that has applied
 # => {"" => nil, "A" => :a, "1" => 1}
 ```
 
-The result in case of collision is undefined:
+The result in case of key collision is not guaranteed:
 
 ```ruby
 {"a" => 1, a: 2}.transform_keys { |key| key.to_s.upcase }
-# => {"A" => 2}, in my test, can't rely on this result though
+# The result could either be
+# => {"A"=>2}
+# or
+# => {"A"=>1}
 ```
 
 This method may be useful for example to build specialized conversions. For instance `stringify_keys` and `symbolize_keys` use `transform_keys` to perform their key conversions:
@@ -2758,11 +2761,14 @@ The method `stringify_keys` returns a hash that has a stringified version of the
 # => {"" => nil, "a" => :a, "1" => 1}
 ```
 
-The result in case of collision is undefined:
+The result in case of key collision is not guaranteed:
 
 ```ruby
 {"a" => 1, a: 2}.stringify_keys
-# => {"a" => 2}, in my test, can't rely on this result though
+# The result could either be
+# => {"a"=>2}
+# or
+# => {"a"=>1}
 ```
 
 This method may be useful for example to easily accept both symbols and strings as options. For instance `ActionView::Helpers::FormHelper` defines:
@@ -2799,11 +2805,14 @@ The method `symbolize_keys` returns a hash that has a symbolized version of the
 
 WARNING. Note in the previous example only one key was symbolized.
 
-The result in case of collision is undefined:
+The result in case of key collision is not guaranteed:
 
 ```ruby
 {"a" => 1, a: 2}.symbolize_keys
-# => {:a=>2}, in my test, can't rely on this result though
+# The result could either be
+# => {:a=>2}
+# or
+# => {:a=>1}
 ```
 
 This method may be useful for example to easily accept both symbols and strings as options. For instance `ActionController::UrlRewriter` defines
-- 
cgit v1.2.3


From 245574ae02216fcf29c93c2a2fe2ca74c00ffc1f Mon Sep 17 00:00:00 2001
From: Hendy Tanata <htanata@gmail.com>
Date: Thu, 27 Feb 2014 19:39:17 -0800
Subject: Fix code alignment in duplicable? guide.

[skip ci]
---
 guides/source/active_support_core_extensions.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 7e6cda4b26..ad5c9d4466 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -157,9 +157,9 @@ Active Support provides `duplicable?` to programmatically query an object about
 
 ```ruby
 "foo".duplicable? # => true
-"".duplicable?     # => true
+"".duplicable?    # => true
 0.0.duplicable?   # => false
-false.duplicable?  # => false
+false.duplicable? # => false
 ```
 
 By definition all objects are `duplicable?` except `nil`, `false`, `true`, symbols, numbers, class, and module objects.
-- 
cgit v1.2.3


From cee7a06746ef194c922f96209a876648b8be0d59 Mon Sep 17 00:00:00 2001
From: Hendy Tanata <htanata@gmail.com>
Date: Fri, 28 Feb 2014 11:28:24 -0800
Subject: Improve collision explanation for Hash#transform_keys.

Based on comments at
https://github.com/rails/docrails/commit/42417b0013819e573be9ffc5402e179003156e8e#commitcomment-5527251

[skip ci]
---
 guides/source/active_support_core_extensions.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index ad5c9d4466..5698dc0413 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -2719,7 +2719,7 @@ The method `transform_keys` accepts a block and returns a hash that has applied
 # => {"" => nil, "A" => :a, "1" => 1}
 ```
 
-The result in case of key collision is not guaranteed:
+In case of key collision, one of the values will be chosen. The chosen value may not always be the same given the same hash:
 
 ```ruby
 {"a" => 1, a: 2}.transform_keys { |key| key.to_s.upcase }
@@ -2761,7 +2761,7 @@ The method `stringify_keys` returns a hash that has a stringified version of the
 # => {"" => nil, "a" => :a, "1" => 1}
 ```
 
-The result in case of key collision is not guaranteed:
+In case of key collision, one of the values will be chosen. The chosen value may not always be the same given the same hash:
 
 ```ruby
 {"a" => 1, a: 2}.stringify_keys
@@ -2805,7 +2805,7 @@ The method `symbolize_keys` returns a hash that has a symbolized version of the
 
 WARNING. Note in the previous example only one key was symbolized.
 
-The result in case of key collision is not guaranteed:
+In case of key collision, one of the values will be chosen. The chosen value may not always be the same given the same hash:
 
 ```ruby
 {"a" => 1, a: 2}.symbolize_keys
-- 
cgit v1.2.3


From 589d1ed722a3add255adc5636eab7dcc262dd0ca Mon Sep 17 00:00:00 2001
From: Hendy Tanata <htanata@gmail.com>
Date: Wed, 5 Mar 2014 11:38:39 -0800
Subject: Update doc for TagHelper.

---
 actionview/lib/action_view/helpers/tag_helper.rb | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index 3528381781..a9f3b0ffbc 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -42,7 +42,8 @@ module ActionView
       # For example, a key +user_id+ would render as <tt>data-user-id</tt> and
       # thus accessed as <tt>dataset.userId</tt>.
       #
-      # Values are encoded to JSON, with the exception of strings and symbols.
+      # Values are encoded to JSON, with the exception of strings, symbols and
+      # BigDecimals.
       # This may come in handy when using jQuery's HTML5-aware <tt>.data()</tt>
       # from 1.4.3.
       #
@@ -56,6 +57,9 @@ module ActionView
       #   tag("input", type: 'text', disabled: true)
       #   # => <input type="text" disabled="disabled" />
       #
+      #   tag("input", type: 'text', class: ["strong", "highlight"])
+      #   # => <input class="strong highlight" type="text" />
+      #
       #   tag("img", src: "open & shut.png")
       #   # => <img src="open &amp; shut.png" />
       #
@@ -75,7 +79,7 @@ module ActionView
       # Set escape to false to disable attribute value escaping.
       #
       # ==== Options
-      # The +options+ hash is used with attributes with no value like (<tt>disabled</tt> and
+      # The +options+ hash can be used with attributes with no value like (<tt>disabled</tt> and
       # <tt>readonly</tt>), which you can give a value of true in the +options+ hash. You can use
       # symbols or strings for the attribute names.
       #
@@ -84,6 +88,8 @@ module ActionView
       #    # => <p>Hello world!</p>
       #   content_tag(:div, content_tag(:p, "Hello world!"), class: "strong")
       #    # => <div class="strong"><p>Hello world!</p></div>
+      #   content_tag(:div, "Hello world!", class: ["strong", "highlight"])
+      #    # => <div class="strong highlight">Hello world!</div>
       #   content_tag("select", options, multiple: true)
       #    # => <select multiple="multiple">...options...</select>
       #
-- 
cgit v1.2.3


From 24434880d91ceae15e68fdd90b466ec29627388a Mon Sep 17 00:00:00 2001
From: dmathieu <42@dmathieu.com>
Date: Fri, 7 Mar 2014 14:52:44 +0100
Subject: unscope doesn't remove only the default_scope, but all of them.

[ci-skip]
Closes rails/rails#14294
---
 activerecord/lib/active_record/scoping/default.rb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb
index 01fec31544..da01464eb5 100644
--- a/activerecord/lib/active_record/scoping/default.rb
+++ b/activerecord/lib/active_record/scoping/default.rb
@@ -11,7 +11,7 @@ module ActiveRecord
       end
 
       module ClassMethods
-        # Returns a scope for the model without the +default_scope+.
+        # Returns a scope for the model without the previously set scopes.
         #
         #   class Post < ActiveRecord::Base
         #     def self.default_scope
@@ -19,11 +19,12 @@ module ActiveRecord
         #     end
         #   end
         #
-        #   Post.all          # Fires "SELECT * FROM posts WHERE published = true"
-        #   Post.unscoped.all # Fires "SELECT * FROM posts"
+        #   Post.all                                  # Fires "SELECT * FROM posts WHERE published = true"
+        #   Post.unscoped.all                         # Fires "SELECT * FROM posts"
+        #   Post.where(published: false).unscoped.app # Fires "SELECT * FROM posts"
         #
         # This method also accepts a block. All queries inside the block will
-        # not use the +default_scope+:
+        # not use the previously set scopes.
         #
         #   Post.unscoped {
         #     Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10"
-- 
cgit v1.2.3


From 3f1699a780de5cd0c3433bc3427cc43f08f77040 Mon Sep 17 00:00:00 2001
From: dmathieu <42@dmathieu.com>
Date: Fri, 7 Mar 2014 15:06:20 +0100
Subject: fix typo app -> all

Thank you @bquorning
---
 activerecord/lib/active_record/scoping/default.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb
index da01464eb5..73ab3b39aa 100644
--- a/activerecord/lib/active_record/scoping/default.rb
+++ b/activerecord/lib/active_record/scoping/default.rb
@@ -21,7 +21,7 @@ module ActiveRecord
         #
         #   Post.all                                  # Fires "SELECT * FROM posts WHERE published = true"
         #   Post.unscoped.all                         # Fires "SELECT * FROM posts"
-        #   Post.where(published: false).unscoped.app # Fires "SELECT * FROM posts"
+        #   Post.where(published: false).unscoped.all # Fires "SELECT * FROM posts"
         #
         # This method also accepts a block. All queries inside the block will
         # not use the previously set scopes.
-- 
cgit v1.2.3