From 2e4b741111b93d13b2b19537cf68645aff14c57e Mon Sep 17 00:00:00 2001
From: Jaime Iniesta <jaimeiniesta@gmail.com>
Date: Tue, 20 Jul 2010 14:22:19 +0200
Subject: Active Record Validations and Callbacks guide: Fixed typos and
 rephrased some paragraphs for clarity

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

(limited to 'railties')

diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 84c33e34f9..be9917868f 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -1,22 +1,22 @@
 h2. Active Record Validations and Callbacks
 
-This guide teaches you how to hook into the lifecycle of your Active Record objects. You will learn how to validate the state of objects before they go into the database, and how to perform custom operations at certain points in the object lifecycle.
+This guide teaches you how to hook into the life cycle of your Active Record objects. You will learn how to validate the state of objects before they go into the database, and how to perform custom operations at certain points in the object life cycle.
 
 After reading this guide and trying out the presented concepts, we hope that you'll be able to:
 
-* Understand the lifecycle of Active Record objects
+* Understand the life cycle of Active Record objects
 * Use the built-in Active Record validation helpers
 * Create your own custom validation methods
 * Work with the error messages generated by the validation process
-* Create callback methods that respond to events in the object lifecycle
+* Create callback methods that respond to events in the object life cycle
 * Create special classes that encapsulate common behavior for your callbacks
-* Create Observers that respond to lifecycle events outside of the original class
+* Create Observers that respond to life cycle events outside of the original class
 
 endprologue.
 
-h3. The Object Lifecycle
+h3. The Object Life Cycle
 
-During the normal operation of a Rails application, objects may be created, updated, and destroyed. Active Record provides hooks into this <em>object lifecycle</em> so that you can control your application and its data. 
+During the normal operation of a Rails application, objects may be created, updated, and destroyed. Active Record provides hooks into this <em>object life cycle</em> so that you can control your application and its data. 
 
 Validations allow you to ensure that only valid data is stored in your database. Callbacks and observers allow you to trigger logic before or after an alteration of an object's state.
 
@@ -57,7 +57,7 @@ We can see how it works by looking at some +rails console+ output:
 => false
 </shell>
 
-Creating and saving a new record will send an SQL +INSERT+ operation to the database. Updating an existing record will send an SQL +UPDATE+ operation instead. Validations are typically run before these commands are sent to the database. If any validations fail, the object will be marked as invalid and Active Record will not perform the +INSERT+ or +UPDATE+ operation. This helps to avoid storing an invalid object in the database. You can choose to have specific validations run when an object is created, saved, or updated.
+Creating and saving a new record will send a SQL +INSERT+ operation to the database. Updating an existing record will send a SQL +UPDATE+ operation instead. Validations are typically run before these commands are sent to the database. If any validations fail, the object will be marked as invalid and Active Record will not perform the +INSERT+ or +UPDATE+ operation. This helps to avoid storing an invalid object in the database. You can choose to have specific validations run when an object is created, saved, or updated.
 
 CAUTION: There are many ways to change the state of an object in the database. Some methods will trigger validations, but some will not. This means that it's possible to save an object in the database in an invalid state if you aren't careful.
 
@@ -838,7 +838,7 @@ This will result in something like the following:
 
 h3. Callbacks Overview
 
-Callbacks are methods that get called at certain moments of an object's lifecycle. With callbacks it's possible to write code that will run whenever an Active Record object is created, saved, updated, deleted, validated, or loaded from the database.
+Callbacks are methods that get called at certain moments of an object's life cycle. With callbacks it's possible to write code that will run whenever an Active Record object is created, saved, updated, deleted, validated, or loaded from the database.
 
 h4. Callback Registration
 
@@ -984,7 +984,7 @@ h3. Halting Execution
 
 As you start registering new callbacks for your models, they will be queued for execution. This queue will include all your model's validations, the registered callbacks, and the database operation to be executed. 
 
-The whole callback chain is wrapped in a transaction. If any before callback method returns exactly +false+ or raises an exception the execution chain gets halted and a ROLLBACK is issued. After callbacks can only accomplish that by raising an exception.
+The whole callback chain is wrapped in a transaction. If any <em>before</em> callback method returns exactly +false+ or raises an exception the execution chain gets halted and a ROLLBACK is issued; <em>after</em> callbacks can only accomplish that by raising an exception.
 
 WARNING. Raising an arbitrary exception may break code that expects +save+ and friends not to fail like that. The +ActiveRecord::Rollback+ exception is thought precisely to tell Active Record a rollback is going on. That one is internally captured but not reraised.
 
@@ -1020,7 +1020,7 @@ Like in validations, we can also make our callbacks conditional, calling them on
 
 h4. Using +:if+ and +:unless+ with a Symbol
 
-You can associate the +:if+ and +:unless+ options with a symbol corresponding to the name of a method that will get called right before the callback. If this method returns +false+ the callback won't be executed. This is the most common option. Using this form of registration it's also possible to register several different methods that should be called to check if the callback should be executed.
+You can associate the +:if+ and +:unless+ options with a symbol corresponding to the name of a method that will get called right before the callback. When using the +:if+ option, the callback won't be executed if the method returns +false+; when using the +:unless+ option, the callback won't be executed if the method returns +true+. This is the most common option. Using this form of registration it's also possible to register several different methods that should be called to check if the callback should be executed.
 
 <ruby>
 class Order < ActiveRecord::Base
@@ -1135,7 +1135,7 @@ Observers are conventionally placed inside of your +app/models+ directory and re
 config.active_record.observers = :user_observer
 </ruby>
 
-As usual, settings in +config/environments+ take precedence over those in +config/environment.rb+. So, if you prefer that an observer not run in all environments, you can simply register it in a specific environment instead.
+As usual, settings in +config/environments+ take precedence over those in +config/environment.rb+. So, if you prefer that an observer doesn't run in all environments, you can simply register it in a specific environment instead.
 
 h4. Sharing Observers
 
@@ -1162,6 +1162,7 @@ h3. Changelog
 
 "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213/tickets/26-active-record-validations-and-callbacks
 
+* July 20, 2010: Fixed typos and rephrased some paragraphs for clarity. "Jaime Iniesta":http://jaimeiniesta.com
 * May 24, 2010: Fixed document to validate XHTML 1.0 Strict. "Jaime Iniesta":http://jaimeiniesta.com
 * May 15, 2010: Validation Errors section updated by "Emili ParreƱo":http://www.eparreno.com
 * March 7, 2009: Callbacks revision by Trevor Turk
-- 
cgit v1.2.3


From 6914d67ed15d41a239407e3c724b670d95a740a6 Mon Sep 17 00:00:00 2001
From: Jaime Iniesta <jaimeiniesta@gmail.com>
Date: Tue, 20 Jul 2010 18:17:29 +0200
Subject: non-singleton true and false should go on regular font

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

(limited to 'railties')

diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index be9917868f..c7ba130a90 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -1020,7 +1020,7 @@ Like in validations, we can also make our callbacks conditional, calling them on
 
 h4. Using +:if+ and +:unless+ with a Symbol
 
-You can associate the +:if+ and +:unless+ options with a symbol corresponding to the name of a method that will get called right before the callback. When using the +:if+ option, the callback won't be executed if the method returns +false+; when using the +:unless+ option, the callback won't be executed if the method returns +true+. This is the most common option. Using this form of registration it's also possible to register several different methods that should be called to check if the callback should be executed.
+You can associate the +:if+ and +:unless+ options with a symbol corresponding to the name of a method that will get called right before the callback. When using the +:if+ option, the callback won't be executed if the method returns false; when using the +:unless+ option, the callback won't be executed if the method returns true. This is the most common option. Using this form of registration it's also possible to register several different methods that should be called to check if the callback should be executed.
 
 <ruby>
 class Order < ActiveRecord::Base
-- 
cgit v1.2.3


From b2818b24725e5bc468af8ef870c21f4098b20822 Mon Sep 17 00:00:00 2001
From: Xavier Noria <fxn@hashref.com>
Date: Thu, 22 Jul 2010 00:16:26 +0200
Subject: routing guide: a "photo" resource has by convention paths under
 "photos", in plural

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

(limited to 'railties')

diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 72a76e25bb..ae80ba77e4 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -441,13 +441,13 @@ h4. Segment Constraints
 You can use the +:constraints+ option to enforce a format for a dynamic segment:
 
 <ruby>
-match 'photo/:id' => 'photos#show', :constraints => { :id => /[A-Z]\d{5}/ }
+match 'photos/:id' => 'photos#show', :constraints => { :id => /[A-Z]\d{5}/ }
 </ruby>
 
-This route would match URLs such as +/photo/A12345+. You can more succinctly express the same route this way:
+This route would match URLs such as +/photos/A12345+. You can more succinctly express the same route this way:
 
 <ruby>
-match 'photo/:id' => 'photos#show', :id => /[A-Z]\d{5}/
+match 'photos/:id' => 'photos#show', :id => /[A-Z]\d{5}/
 </ruby>
 
 +:constraints+ takes regular expression. However note that regexp anchors can't be used within constraints. For example following route will not work:
@@ -472,7 +472,7 @@ You can also constrain a route based on any method on the <a href="action_contro
 You specify a request-based constraint the same way that you specify a segment constraint:
 
 <ruby>
-match "photo", :constraints => {:subdomain => "admin"}
+match "photos", :constraints => {:subdomain => "admin"}
 </ruby>
 
 You can also specify constrains in a block form:
@@ -511,10 +511,10 @@ h4. Route Globbing
 Route globbing is a way to specify that a particular parameter should be matched to all the remaining parts of a route. For example
 
 <ruby>
-match 'photo/*other' => 'photos#unknown'
+match 'photos/*other' => 'photos#unknown'
 </ruby>
 
-This route would match +photo/12+ or +/photo/long/path/to/12+, setting +params[:other]+ to +"12"+ or +"long/path/to/12"+.
+This route would match +photos/12+ or +/photos/long/path/to/12+, setting +params[:other]+ to +"12"+ or +"long/path/to/12"+.
 
 h4. Redirection
 
-- 
cgit v1.2.3


From 5cba6635787ed65a420d48ea0e93ff4af2ba59f2 Mon Sep 17 00:00:00 2001
From: Xavier Noria <fxn@hashref.com>
Date: Thu, 22 Jul 2010 00:32:39 +0200
Subject: routing guide: say "path" when you mean path

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

(limited to 'railties')

diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index ae80ba77e4..7e6d6b5b34 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -5,14 +5,14 @@ This guide covers the user-facing features of Rails routing. By referring to thi
 * Understand the code in +routes.rb+
 * Construct your own routes, using either the preferred resourceful style or with the @match@ method
 * Identify what parameters to expect an action to receive
-* Automatically create URLs using route helpers
+* Automatically create paths and URLs using route helpers
 * Use advanced techniques such as constraints and Rack endpoints
 
 endprologue.
 
 h3. The Purpose of the Rails Router
 
-The Rails router recognizes URLs and dispatches them to a controller's action. It can also generate URLs, avoiding the need to hardcode URL strings in your views.
+The Rails router recognizes URLs and dispatches them to a controller's action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.
 
 h4. Connecting URLs to Code
 
@@ -30,9 +30,9 @@ match "/patients/:id" => "patients#show"
 
 the request is dispatched to the +patients+ controller's +show+ action with <tt>{ :id => "17" }</tt> in +params+.
 
-h4. Generating URLs from Code
+h4. Generating Paths and URLs from Code
 
-You can also generate URLs. If your application contains this code:
+You can also generate paths and URLs. If your application contains this code:
 
 <ruby>
 @patient = Patient.find(17)
@@ -76,7 +76,7 @@ resources :photos
 
 creates seven different routes in your application, all mapping to the +Photos+ controller:
 
-|_. Verb |_.URL             |_.action |_.used for|
+|_. Verb |_.Path            |_.action |_.used for|
 |GET     |/photos           |index    |display a list of all photos|
 |GET     |/photos/new       |new      |return an HTML form for creating a new photo|
 |POST    |/photos           |create   |create a new photo|
@@ -85,7 +85,7 @@ creates seven different routes in your application, all mapping to the +Photos+
 |PUT     |/photos/:id       |update   |update a specific photo|
 |DELETE  |/photos/:id       |destroy  |delete a specific photo|
 
-h4. URLs and Paths
+h4. Paths and URLs
 
 Creating a resourceful route will also expose a number of helpers to the controllers in your application. In the case of +resources :photos+:
 
@@ -130,7 +130,7 @@ resource :geocoder
 
 creates six different routes in your application, all mapping to the +Geocoders+ controller:
 
-|_. Verb    |_.URL          |_.action |_.used for|
+|_. Verb    |_.Path         |_.action |_.used for|
 |GET        |/geocoder/new  |new      |return an HTML form for creating the geocoder|
 |POST       |/geocoder      |create   |create the new geocoder|
 |GET        |/geocoder      |show     |display the one and only geocoder resource|
@@ -160,7 +160,7 @@ end
 
 This will create a number of routes for each of the +posts+ and +comments+ controller. For +Admin::PostsController+, Rails will create:
 
-|_. Verb |_.URL                |_.action |_. helper                  |
+|_. Verb |_.Path               |_.action |_. helper                  |
 |GET     |/admin/photos        |index    | admin_photos_path         |
 |GET     |/admin/photos/new    |new      | new_admin_photos_path     |
 |POST    |/admin/photos        |create   | admin_photos_path         |
@@ -197,16 +197,16 @@ or, for a single case
 resources :posts, :path => "/admin"
 </ruby>
 
-In each of these cases, the named routes remain the same as if you did not use +scope+. In the last case, the following URLs map to +PostsController+:
+In each of these cases, the named routes remain the same as if you did not use +scope+. In the last case, the following paths map to +PostsController+:
 
-|_. Verb |_.URL         |_.action |_. helper            |
-|GET     |photos        |index    | photos_path         |
-|GET     |photos/new    |new      | photos_path         |
-|POST    |photos        |create   | photos_path         |
-|GET     |photos/1      |show     | photo_path(id)      |
-|GET     |photos/1/edit |edit     | edit_photo_path(id) |
-|PUT     |photos/1      |update   | photo_path(id)      |
-|DELETE  |photos/1      |destroy  | photo_path(id)      |
+|_. Verb |_.Path               |_.action |_. helper            |
+|GET     |/admin/photos        |index    | photos_path         |
+|GET     |/admin/photos/new    |new      | photos_path         |
+|POST    |/admin/photos        |create   | photos_path         |
+|GET     |/admin/photos/1      |show     | photo_path(id)      |
+|GET     |/admin/photos/1/edit |edit     | edit_photo_path(id) |
+|PUT     |/admin/photos/1      |update   | photo_path(id)      |
+|DELETE  |/admin/photos/1      |destroy  | photo_path(id)      |
 
 h4. Nested Resources
 
@@ -232,7 +232,7 @@ end
 
 In addition to the routes for magazines, this declaration will also route ads to an +AdsController+. The ad URLs require a magazine:
 
-|_.Verb |_.URL                    |_.action |_.used for|
+|_.Verb |_.Path                   |_.action |_.used for|
 |GET    |/magazines/1/ads         |index    |display a list of all ads for a specific magazine|
 |GET    |/magazines/1/ads/new     |new      |return an HTML form for creating a new ad belonging to a specific magazine|
 |POST   |/magazines/1/ads         |create   |create a new ad belonging to a specific magazine|
@@ -256,7 +256,7 @@ resources :publishers do
 end
 </ruby>
 
-Deeply-nested resources quickly become cumbersome. In this case, for example, the application would recognize URLs such as
+Deeply-nested resources quickly become cumbersome. In this case, for example, the application would recognize paths such as
 
 <pre>
 /publishers/1/magazines/2/photos/3
@@ -266,9 +266,9 @@ The corresponding route helper would be +publisher_magazine_photo_url+, requirin
 
 TIP: _Resources should never be nested more than 1 level deep._
 
-h4. Creating URLs From Objects
+h4. Creating Paths and URLs From Objects
 
-In addition to using the routing helpers, Rails can also create URLs from an array of parameters. For example, suppose you have this set of routes:
+In addition to using the routing helpers, Rails can also create paths and URLs from an array of parameters. For example, suppose you have this set of routes:
 
 <ruby>
 resources :magazines do
@@ -340,7 +340,7 @@ resources :photos do
 end
 </ruby>
 
-This will enable Rails to recognize URLs such as +/photos/search+ with GET, and route to the +search+ action of +PhotosController+. It will also create the +search_photos_url+ and +search_photos_path+ route helpers.
+This will enable Rails to recognize paths such as +/photos/search+ with GET, and route to the +search+ action of +PhotosController+. It will also create the +search_photos_url+ and +search_photos_path+ route helpers.
 
 Just as with member routes, you can pass +:on+ to a route:
 
@@ -380,7 +380,7 @@ You can set up as many dynamic segments within a regular route as you like. Anyt
 match ':controller/:action/:id/:user_id'
 </ruby>
 
-An incoming URL of +/photos/show/1/2+ will be dispatched to the +show+ action of the +PhotosController+. +params[:id]+ will be +"1"+, and +params[:user_id]+ will be +"2"+.
+An incoming path of +/photos/show/1/2+ will be dispatched to the +show+ action of the +PhotosController+. +params[:id]+ will be +"1"+, and +params[:user_id]+ will be +"2"+.
 
 NOTE: You can't use +namespace+ or +:module+ with a +:controller+ path segment. If you need to do this then use a constraint on :controller that matches the namespace you require. e.g:
 
@@ -396,7 +396,7 @@ You can specify static segments when creating a route:
 match ':controller/:action/:id/with_user/:user_id'
 </ruby>
 
-This route would respond to URLs such as +/photos/show/1/with_user/2+. In this case, +params+ would be <tt>{ :controller => "photos", :action => "show", :id => "1", :user_id => "2" }</tt>.
+This route would respond to paths such as +/photos/show/1/with_user/2+. In this case, +params+ would be <tt>{ :controller => "photos", :action => "show", :id => "1", :user_id => "2" }</tt>.
 
 h4. The Query String
 
@@ -406,7 +406,7 @@ The +params+ will also include any parameters from the query string. For example
 match ':controller/:action/:id'
 </ruby>
 
-An incoming URL of +/photos/show/1?user_id=2+ will be dispatched to the +show+ action of the +Photos+ controller. +params+ will be <tt>{ :controller => "photos", :action => "show", :id => "1", :user_id => "2" }</tt>.
+An incoming path of +/photos/show/1?user_id=2+ will be dispatched to the +show+ action of the +Photos+ controller. +params+ will be <tt>{ :controller => "photos", :action => "show", :id => "1", :user_id => "2" }</tt>.
 
 h4. Defining Defaults
 
@@ -416,7 +416,7 @@ You do not need to explicitly use the +:controller+ and +:action+ symbols within
 match 'photos/:id' => 'photos#show'
 </ruby>
 
-With this route, Rails will match an incoming URL of +/photos/12+ to the +show+ action of  +PhotosController+.
+With this route, Rails will match an incoming path of +/photos/12+ to the +show+ action of  +PhotosController+.
 
 You can also define other defaults in a route by supplying a hash for the +:defaults+ option. This even applies to parameters that you do not specify as dynamic segments. For example:
 
@@ -444,7 +444,7 @@ You can use the +:constraints+ option to enforce a format for a dynamic segment:
 match 'photos/:id' => 'photos#show', :constraints => { :id => /[A-Z]\d{5}/ }
 </ruby>
 
-This route would match URLs such as +/photos/A12345+. You can more succinctly express the same route this way:
+This route would match paths such as +/photos/A12345+. You can more succinctly express the same route this way:
 
 <ruby>
 match 'photos/:id' => 'photos#show', :id => /[A-Z]\d{5}/
@@ -573,9 +573,9 @@ The +:controller+ option lets you explicitly specify a controller to use for the
 resources :photos, :controller => "images"
 </ruby>
 
-will recognize incoming URLs beginning with +/photo+ but route to the +Images+ controller:
+will recognize incoming paths beginning with +/photo+ but route to the +Images+ controller:
 
-|_. Verb |_.URL          |_.action |
+|_. Verb |_.Path         |_.action |
 |GET     |/photos        |index    |
 |GET     |/photos/new    |new      |
 |POST    |/photos        |create   |
@@ -584,7 +584,7 @@ will recognize incoming URLs beginning with +/photo+ but route to the +Images+ c
 |PUT     |/photos/1      |update   |
 |DELETE  |/photos/1      |destroy  |
 
-NOTE: Use +photos_path+, +new_photos_path+, etc. to generate URLs for this resource.
+NOTE: Use +photos_path+, +new_photos_path+, etc. to generate paths for this resource.
 
 h4. Specifying Constraints
 
@@ -615,9 +615,9 @@ The +:as+ option lets you override the normal naming for the named route helpers
 resources :photos, :as => "images"
 </ruby>
 
-will recognize incoming URLs beginning with +/photos+ and route the requests to +PhotosController+:
+will recognize incoming paths beginning with +/photos+ and route the requests to +PhotosController+:
 
-|_.HTTP verb|_.URL           |_.action |_.named helper   |
+|_.HTTP verb|_.Path          |_.action |_.named helper   |
 |GET        |/photos         |index    | images_path     |
 |GET        |/photos/new     |new      | new_image_path  |
 |POST       |/photos         |create   | images_path     |
@@ -628,20 +628,20 @@ will recognize incoming URLs beginning with +/photos+ and route the requests to
 
 h4. Overriding the +new+ and +edit+ Segments
 
-The +:path_names+ option lets you override the automatically-generated "new" and "edit" segments in URLs:
+The +:path_names+ option lets you override the automatically-generated "new" and "edit" segments in paths:
 
 <ruby>
 resources :photos, :path_names => { :new => 'make', :edit => 'change' }
 </ruby>
 
-This would cause the routing to recognize URLs such as
+This would cause the routing to recognize paths such as
 
 <plain>
 /photos/make
 /photos/1/change
 </plain>
 
-NOTE: The actual action names aren't changed by this option. The two URLs shown would still route to the new and edit actions.
+NOTE: The actual action names aren't changed by this option. The two paths shown would still route to the +new+ and +edit+ actions.
 
 TIP: If you find yourself wanting to change this option uniformly for all of your routes, you can use a scope:
 
@@ -709,7 +709,7 @@ end
 
 Rails now creates routes to the +CategoriesControlleR+.
 
-|_.HTTP verb|_.URL                      |_.action |
+|_.HTTP verb|_.Path                     |_.action |
 |GET        |/kategorien                |index    |
 |GET        |/kategorien/neu            |new      |
 |POST       |/kategorien                |create   |
-- 
cgit v1.2.3


From 56669ec3048de316918ec5ad554fff83d757911b Mon Sep 17 00:00:00 2001
From: Xavier Noria <fxn@hashref.com>
Date: Thu, 22 Jul 2010 01:27:02 +0200
Subject: camelize and underscore are sort of inverse of each other, but not in
 a mathematical sense [#5174 state:resolved]

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

(limited to 'railties')

diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index a0ed8d6a90..297dad2ccc 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -1469,13 +1469,15 @@ end
 
 That may be handy to compute method names in a language that follows that convention, for example JavaScript.
 
+INFO: As a rule of thumb you can think of +camelize+ as the inverse of +underscore+, though there are cases where that does not hold: <tt>"SSLError".underscore.camelize</tt> gives back <tt>"SslError"</tt>.
+
 +camelize+ is aliased to +camelcase+.
 
 NOTE: Defined in +active_support/core_ext/string/inflections.rb+.
 
 h5. +underscore+
 
-The method +underscore+ is the inverse of +camelize+, explained above:
+The method +underscore+ goes the other way around, from camel case to paths:
 
 <ruby>
 "Product".underscore   # => "product"
@@ -1508,6 +1510,8 @@ def load_missing_constant(from_mod, const_name)
 end
 </ruby>
 
+INFO: As a rule of thumb you can think of +underscore+ as the inverse of +camelize+, though there are cases where that does not hold. For example, <tt>"SSLError".underscore.camelize</tt> gives back <tt>"SslError"</tt>.
+
 NOTE: Defined in +active_support/core_ext/string/inflections.rb+.
 
 h5. +titleize+
-- 
cgit v1.2.3


From 4ed9bd6431d1733d83de0b461280f77f78a9c4c6 Mon Sep 17 00:00:00 2001
From: Bobby Wilson <bobbywilson0@gmail.com>
Date: Wed, 21 Jul 2010 20:34:00 -0700
Subject: Changed code style that was incorrectly rendering block style instead
 of inline.

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

(limited to 'railties')

diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 7e6d6b5b34..7b665d81e7 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -3,7 +3,7 @@ h2. Rails Routing from the Outside In
 This guide covers the user-facing features of Rails routing. By referring to this guide, you will be able to:
 
 * Understand the code in +routes.rb+
-* Construct your own routes, using either the preferred resourceful style or with the @match@ method
+* Construct your own routes, using either the preferred resourceful style or with the <tt>match</tt> method
 * Identify what parameters to expect an action to receive
 * Automatically create paths and URLs using route helpers
 * Use advanced techniques such as constraints and Rack endpoints
-- 
cgit v1.2.3


From 2d2bde9f543a1508e9b149751a4566780033e3f0 Mon Sep 17 00:00:00 2001
From: Ivan Torres <mexpolk@gmail.com>
Date: Thu, 22 Jul 2010 10:10:38 -0500
Subject: [PATCH] Update guides after Jeremy Kemper's changes on
 fieldWithErrors to field_with_errors [#157 state:resolved]

---
 railties/guides/source/active_record_validations_callbacks.textile | 4 ++--
 railties/guides/source/configuring.textile                         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'railties')

diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index c7ba130a90..37a65d211e 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -799,7 +799,7 @@ h4. Customizing the Error Messages CSS
 
 The selectors to customize the style of error messages are:
 
-* +.fieldWithErrors+ - Style for the form fields and labels with errors.
+* +.field_with_errors+ - Style for the form fields and labels with errors.
 * +#errorExplanation+ - Style for the +div+ element with the error messages.
 * +#errorExplanation h2+ - Style for the header of the +div+ element.
 * +#errorExplanation p+ - Style for the paragraph that holds the message that appears right below the header of the +div+ element.
@@ -811,7 +811,7 @@ The name of the class and the id can be changed with the +:class+ and +:id+ opti
 
 h4. Customizing the Error Messages HTML
 
-By default, form fields with errors are displayed enclosed by a +div+ element with the +fieldWithErrors+ CSS class. However, it's possible to override that. 
+By default, form fields with errors are displayed enclosed by a +div+ element with the +field_with_errors+ CSS class. However, it's possible to override that. 
 
 The way form fields with errors are treated is defined by +ActionView::Base.field_error_proc+. This is a +Proc+ that receives two parameters:
 
diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index 86655746e4..2ab28596d8 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -181,7 +181,7 @@ There are only a few configuration options for Action View, starting with four o
 
 * +config.action_view.warn_cache_misses+ tells Rails to display a warning whenever an action results in a cache miss on your view paths. The default is +false+.
 
-* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is <tt>Proc.new{ |html_tag, instance| "&lt;div class=\"fieldWithErrors\"&gt;#{html_tag}&lt;/div&gt;" }</tt>
+* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is <tt>Proc.new{ |html_tag, instance| "&lt;div class=\"field_with_errors\"&gt;#{html_tag}&lt;/div&gt;" }</tt>
 
 * +config.action_view.default_form_builder+ tells Rails which form builder to use by default. The default is +ActionView::Helpers::FormBuilder+.
 
-- 
cgit v1.2.3


From 9a9fb12623c5d7eb7b3165c56985fbedfcebf886 Mon Sep 17 00:00:00 2001
From: Jack Dempsey <jack.dempsey@gmail.com>
Date: Sat, 24 Jul 2010 15:28:45 -0400
Subject: Fix small middlewares typo

---
 railties/lib/rails/railtie.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'railties')

diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index 1d6a2de87d..f0d9d95fc4 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -70,7 +70,7 @@ module Rails
   #
   #   class MyRailtie < Rails::Railtie
   #     initializer "my_railtie.configure_rails_initialization" do |app|
-  #       app.middlewares.use MyRailtie::Middleware
+  #       app.middleware.use MyRailtie::Middleware
   #     end
   #   end
   #
-- 
cgit v1.2.3