aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_querying.md
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2014-12-22 15:06:41 -0200
committerAndrey Nering <andrey.nering@gmail.com>2014-12-22 15:25:32 -0200
commit024edd365bcb21dee6775b196df98d16381073de (patch)
tree9b4a923679380763c6755e3f4dc3e49f6c66ffea /guides/source/active_record_querying.md
parent0369808917f7a67b6375aaaa34f20d773ae9b339 (diff)
downloadrails-024edd365bcb21dee6775b196df98d16381073de.tar.gz
rails-024edd365bcb21dee6775b196df98d16381073de.tar.bz2
rails-024edd365bcb21dee6775b196df98d16381073de.zip
Do not use line breaks on notes [ci skip]
References #18138
Diffstat (limited to 'guides/source/active_record_querying.md')
-rw-r--r--guides/source/active_record_querying.md8
1 files changed, 2 insertions, 6 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index 2e7bb74d0b..a3d7916fc8 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -1382,16 +1382,12 @@ WHERE people.name = 'John'
LIMIT 1
```
-NOTE: Remember that, if `find_by` return more than one registry, it will take just the first
-and ignore the others. Note the `LIMIT 1` statement above.
+NOTE: Remember that, if `find_by` return more than one registry, it will take just the first and ignore the others. Note the `LIMIT 1` statement above.
Find or Build a New Object
--------------------------
-NOTE: Some dynamic finders were deprecated in Rails 4.0 and
-removed in Rails 4.1. The best practice is to use Active Record scopes
-instead. You can find the deprecation gem at
-https://github.com/rails/activerecord-deprecated_finders
+NOTE: Some dynamic finders were deprecated in Rails 4.0 and removed in Rails 4.1. The best practice is to use Active Record scopes instead. You can find the deprecation gem at https://github.com/rails/activerecord-deprecated_finders
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.