From a3a73c4465f8860bf9c98809f41e8dd54466287c Mon Sep 17 00:00:00 2001
From: Tima Maslyuchenko <dudapip3@gmail.com>
Date: Sun, 26 Feb 2012 19:27:57 +0200
Subject: fixed regular expression in Specifying Constraints section

---
 railties/guides/source/routing.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index df2bd9d0c9..5d23e643eb 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -650,7 +650,7 @@ h4. Specifying Constraints
 You can use the +:constraints+ option to specify a required format on the implicit +id+. For example:
 
 <ruby>
-resources :photos, :constraints => {:id => /[A-Z][A-Z][0-9]+/}
+resources :photos, :constraints => {:id => /[a-z][A-Z][0-9]+/}
 </ruby>
 
 This declaration constrains the +:id+ parameter to match the supplied regular expression. So, in this case, the router would no longer match +/photos/1+ to this route. Instead, +/photos/RR27+ would match.
@@ -658,7 +658,7 @@ This declaration constrains the +:id+ parameter to match the supplied regular ex
 You can specify a single constraint to apply to a number of routes by using the block form:
 
 <ruby>
-constraints(:id => /[A-Z][A-Z][0-9]+/) do
+constraints(:id => /[a-z][A-Z][0-9]+/) do
   resources :photos
   resources :accounts
 end
-- 
cgit v1.2.3


From 3689b57e0d0a0c66611a2be7a74a3ea6f444469c Mon Sep 17 00:00:00 2001
From: Rajinder Yadav <info@devmentor.org>
Date: Sun, 26 Feb 2012 12:30:18 -0500
Subject: layout affects views not methods

---
 railties/guides/source/layouts_and_rendering.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile
index be352cfe3d..1943fa185e 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -359,7 +359,7 @@ class ProductsController < ApplicationController
 end
 </ruby>
 
-With this declaration, all of the methods within +ProductsController+ will use +app/views/layouts/inventory.html.erb+ for their layout.
+With this declaration, all of the views belonging to controller, +ProductsController+ will use +app/views/layouts/inventory.html.erb+ for their layout.
 
 To assign a specific layout for the entire application, use a +layout+ declaration in your +ApplicationController+ class:
 
-- 
cgit v1.2.3


From 25ad2e934538e65141fc6dccbeecdb280017284b Mon Sep 17 00:00:00 2001
From: Tima Maslyuchenko <dudapip3@gmail.com>
Date: Sun, 26 Feb 2012 20:58:12 +0200
Subject: reverted regular expression fix

---
 railties/guides/source/routing.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 5d23e643eb..df2bd9d0c9 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -650,7 +650,7 @@ h4. Specifying Constraints
 You can use the +:constraints+ option to specify a required format on the implicit +id+. For example:
 
 <ruby>
-resources :photos, :constraints => {:id => /[a-z][A-Z][0-9]+/}
+resources :photos, :constraints => {:id => /[A-Z][A-Z][0-9]+/}
 </ruby>
 
 This declaration constrains the +:id+ parameter to match the supplied regular expression. So, in this case, the router would no longer match +/photos/1+ to this route. Instead, +/photos/RR27+ would match.
@@ -658,7 +658,7 @@ This declaration constrains the +:id+ parameter to match the supplied regular ex
 You can specify a single constraint to apply to a number of routes by using the block form:
 
 <ruby>
-constraints(:id => /[a-z][A-Z][0-9]+/) do
+constraints(:id => /[A-Z][A-Z][0-9]+/) do
   resources :photos
   resources :accounts
 end
-- 
cgit v1.2.3


From f2f556d583aebf95f2f5163c96538ae6b6437d38 Mon Sep 17 00:00:00 2001
From: Florent Guilleux <florent2@gmail.com>
Date: Sun, 26 Feb 2012 19:07:16 -0500
Subject: document how to create non show paths from an array of parameters

---
 railties/guides/source/routing.textile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index df2bd9d0c9..24e7d09a49 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -301,6 +301,12 @@ If you wanted to link to just a magazine, you could leave out the +Array+:
 <%= link_to "Magazine details", @magazine %>
 </erb>
 
+For other actions, you just need to insert the action name as the first element of the +Array+:
+
+<erb>
+<%= link_to "Edit Ad", [:edit, @magazine, @ad] %>
+</erb>
+
 This allows you to treat instances of your models as URLs, and is a key advantage to using the resourceful style.
 
 h4. Adding More RESTful Actions
-- 
cgit v1.2.3


From 03a6119e3bc4394d6a150fc07e13ceaa6ed44127 Mon Sep 17 00:00:00 2001
From: Toby Matejovsky <toby.matejovsky@gmail.com>
Date: Mon, 27 Feb 2012 16:25:25 -0500
Subject: Correct NullStore cache store name in caching guide

---
 railties/guides/source/caching_with_rails.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/railties/guides/source/caching_with_rails.textile b/railties/guides/source/caching_with_rails.textile
index 6419d32c13..e2c6c7a2a4 100644
--- a/railties/guides/source/caching_with_rails.textile
+++ b/railties/guides/source/caching_with_rails.textile
@@ -359,7 +359,7 @@ h4. ActiveSupport::Cache::NullStore
 This cache store implementation is meant to be used only in development or test environments and it never stores anything. This can be very useful in development when you have code that interacts directly with +Rails.cache+, but caching may interfere with being able to see the results of code changes. With this cache store, all +fetch+ and +read+ operations will result in a miss.
 
 <ruby>
-ActionController::Base.cache_store = :null
+ActionController::Base.cache_store = :null_store
 </ruby>
 
 h4. Custom Cache Stores
-- 
cgit v1.2.3


From 593a09d3b9aea53be5e56006c1be140091674db7 Mon Sep 17 00:00:00 2001
From: Oliver Legg <oliver.legg@mac.com>
Date: Mon, 27 Feb 2012 22:15:01 +0000
Subject: Add brief summary of strict validations added in 3.2.

---
 .../source/active_record_validations_callbacks.textile     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 72ac8d2db9..fc9a2ad30c 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -141,6 +141,20 @@ end
 
 +invalid?+ is simply the inverse of +valid?+. +invalid?+ triggers your validations, returning true if any errors were found in the object, and false otherwise.
 
+h4. Strict Validations
+
+Rails can also be specify strict validations. You can use the +:strict+ option to set that validation as strict. If an object fails a strict validation then an +ActiveModel::StrictValidationFailed+ error message is raised.
+
+<ruby>
+class Person < ActiveRecord::Base
+  validates :name, :presence => {:strict => true}
+end
+
+>> p = Person.new
+>> p.valid?
+=> ActiveModel::StrictValidationFailed: can't be blank
+</ruby>
+
 h4(#validations_overview-errors). +errors[]+
 
 To verify whether or not a particular attribute of an object is valid, you can use +errors[:attribute]+. It returns an array of all the errors for +:attribute+. If there are no errors on the specified attribute, an empty array is returned.
-- 
cgit v1.2.3


From 1d802f19751181d005d0b86ae75f4ba16fc37e47 Mon Sep 17 00:00:00 2001
From: Vijay Dev <vijaydev.cse@gmail.com>
Date: Tue, 28 Feb 2012 18:58:30 +0530
Subject: copy edits [ci skip]

---
 railties/guides/source/layouts_and_rendering.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile
index 1943fa185e..4b4f9f3745 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -359,7 +359,7 @@ class ProductsController < ApplicationController
 end
 </ruby>
 
-With this declaration, all of the views belonging to controller, +ProductsController+ will use +app/views/layouts/inventory.html.erb+ for their layout.
+With this declaration, all of the views rendered by the products controller will use +app/views/layouts/inventory.html.erb+ as their layout.
 
 To assign a specific layout for the entire application, use a +layout+ declaration in your +ApplicationController+ class:
 
-- 
cgit v1.2.3


From 547e695551e223e4d92762d3c176187e6780e524 Mon Sep 17 00:00:00 2001
From: Vijay Dev <vijaydev.cse@gmail.com>
Date: Tue, 28 Feb 2012 18:58:59 +0530
Subject: move the strict validations to an appropriate section and some edits
 [ci skip]

---
 .../active_record_validations_callbacks.textile    | 26 ++++++++++------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index fc9a2ad30c..349d02c1f6 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -141,20 +141,6 @@ end
 
 +invalid?+ is simply the inverse of +valid?+. +invalid?+ triggers your validations, returning true if any errors were found in the object, and false otherwise.
 
-h4. Strict Validations
-
-Rails can also be specify strict validations. You can use the +:strict+ option to set that validation as strict. If an object fails a strict validation then an +ActiveModel::StrictValidationFailed+ error message is raised.
-
-<ruby>
-class Person < ActiveRecord::Base
-  validates :name, :presence => {:strict => true}
-end
-
->> p = Person.new
->> p.valid?
-=> ActiveModel::StrictValidationFailed: can't be blank
-</ruby>
-
 h4(#validations_overview-errors). +errors[]+
 
 To verify whether or not a particular attribute of an object is valid, you can use +errors[:attribute]+. It returns an array of all the errors for +:attribute+. If there are no errors on the specified attribute, an empty array is returned.
@@ -531,6 +517,18 @@ class Person < ActiveRecord::Base
 end
 </ruby>
 
+h3. Strict Validations
+
+You can also specify validations to be strict and raise +ActiveModel::StrictValidationFailed+ when the object is invalid.
+
+<ruby>
+class Person < ActiveRecord::Base
+  validates :name, :presence => { :strict => true }
+end
+
+Person.new.valid?  => ActiveModel::StrictValidationFailed: Name can't be blank
+</ruby>
+
 h3. Conditional Validation
 
 Sometimes it will make sense to validate an object just when a given predicate is satisfied. You can do that by using the +:if+ and +:unless+ options, which can take a symbol, a string or a +Proc+. You may use the +:if+ option when you want to specify when the validation *should* happen. If you want to specify when the validation *should not* happen, then you may use the +:unless+ option.
-- 
cgit v1.2.3