From 024edd365bcb21dee6775b196df98d16381073de Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Mon, 22 Dec 2014 15:06:41 -0200 Subject: Do not use line breaks on notes [ci skip] References #18138 --- guides/source/active_record_querying.md | 8 ++------ 1 file changed, 2 insertions(+), 6 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 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. -- cgit v1.2.3