From 4bdbf0a4a62e831d1ad9ccf7f77f7dd6f8fb2044 Mon Sep 17 00:00:00 2001 From: Drew Dara-Abrams Date: Thu, 6 Dec 2012 16:04:53 -0800 Subject: changing tense, since Rails 3.2 has been released --- guides/source/active_record_querying.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/active_record_querying.md') diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 9620270141..b22cc09951 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1222,7 +1222,7 @@ You can specify an exclamation point (`!`) on the end of the dynamic finders to If you want to find both by name and locked, you can chain these finders together by simply typing "`and`" between the fields. For example, `Client.find_by_first_name_and_locked("Ryan", true)`. -WARNING: Up to and including Rails 3.1, when the number of arguments passed to a dynamic finder method is lesser than the number of fields, say `Client.find_by_name_and_locked("Ryan")`, the behavior is to pass `nil` as the missing argument. This is **unintentional** and this behavior will be changed in Rails 3.2 to throw an `ArgumentError`. +WARNING: Up to and including Rails 3.1, when the number of arguments passed to a dynamic finder method is lesser than the number of fields, say `Client.find_by_name_and_locked("Ryan")`, the behavior is to pass `nil` as the missing argument. This is **unintentional** and this behavior has been changed in Rails 3.2 to throw an `ArgumentError`. Find or build a new object -------------------------- -- cgit v1.2.3 From 7c05ea23a0e6394c61f3d2c1d0ba345784329427 Mon Sep 17 00:00:00 2001 From: Katie Oldaker Date: Fri, 7 Dec 2012 12:50:09 -0500 Subject: Fixed grammar in a lot of guide prologues. --- guides/source/active_record_querying.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'guides/source/active_record_querying.md') diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index b22cc09951..4ee6374175 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -5,13 +5,13 @@ This guide covers different ways to retrieve data from the database using Active After reading this guide, you will know: -* Find records using a variety of methods and conditions. -* Specify the order, retrieved attributes, grouping, and other properties of the found records. -* Use eager loading to reduce the number of database queries needed for data retrieval. -* Use dynamic finders methods. -* Check for the existence of particular records. -* Perform various calculations on Active Record models. -* Run EXPLAIN on relations. +* How to find records using a variety of methods and conditions. +* How to specify the order, retrieved attributes, grouping, and other properties of the found records. +* How to use eager loading to reduce the number of database queries needed for data retrieval. +* How to use dynamic finders methods. +* How to check for the existence of particular records. +* How to perform various calculations on Active Record models. +* How to run EXPLAIN on relations. -------------------------------------------------------------------------------- -- cgit v1.2.3 From fc6336d1bed794681b09cc10c80182cd457fb414 Mon Sep 17 00:00:00 2001 From: Katie Oldaker Date: Fri, 7 Dec 2012 16:31:27 -0500 Subject: Punctuation, capitalization, grammar fixes in rails guides --- guides/source/active_record_querying.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/active_record_querying.md') diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 4ee6374175..641a2f8fc0 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1190,7 +1190,7 @@ class Client < ActiveRecord::Base end ``` -### Removing all scoping +### Removing All Scoping If we wish to remove scoping for any reason we can use the `unscoped` method. This is especially useful if a `default_scope` is specified in the model and should not be @@ -1224,7 +1224,7 @@ If you want to find both by name and locked, you can chain these finders togethe WARNING: Up to and including Rails 3.1, when the number of arguments passed to a dynamic finder method is lesser than the number of fields, say `Client.find_by_name_and_locked("Ryan")`, the behavior is to pass `nil` as the missing argument. This is **unintentional** and this behavior has been changed in Rails 3.2 to throw an `ArgumentError`. -Find or build a new object +Find or Build a New Object -------------------------- It's common that you need to find a record or create it if it doesn't exist. You can do that with the `find_or_create_by` and `find_or_create_by!` methods. -- cgit v1.2.3 From ed78770b1a13788a5d3fcae484f34654de580bd5 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Fri, 7 Dec 2012 23:20:35 -0800 Subject: Remove references to Rails versions. There's no reason for guides to reference old behaviors. They should be current as of the versions of Rails that they ship with, and including older information just clutters thing. I discussed this change with @fxn and he agrees. --- guides/source/active_record_querying.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'guides/source/active_record_querying.md') diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 641a2f8fc0..889e869a2a 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1222,8 +1222,6 @@ You can specify an exclamation point (`!`) on the end of the dynamic finders to If you want to find both by name and locked, you can chain these finders together by simply typing "`and`" between the fields. For example, `Client.find_by_first_name_and_locked("Ryan", true)`. -WARNING: Up to and including Rails 3.1, when the number of arguments passed to a dynamic finder method is lesser than the number of fields, say `Client.find_by_name_and_locked("Ryan")`, the behavior is to pass `nil` as the missing argument. This is **unintentional** and this behavior has been changed in Rails 3.2 to throw an `ArgumentError`. - Find or Build a New Object -------------------------- -- cgit v1.2.3