diff options
author | Jaime Iniesta <jaimeiniesta@gmail.com> | 2012-10-26 14:56:37 +0200 |
---|---|---|
committer | Jaime Iniesta <jaimeiniesta@gmail.com> | 2012-10-26 14:56:37 +0200 |
commit | b1e5c1660b40688993f3ed151143a26da55082db (patch) | |
tree | df8503642465e4c071209c814e5a93d1dc63ac20 | |
parent | 9ac095fef586bcf86ed10d31acbc4af2abb53843 (diff) | |
download | rails-b1e5c1660b40688993f3ed151143a26da55082db.tar.gz rails-b1e5c1660b40688993f3ed151143a26da55082db.tar.bz2 rails-b1e5c1660b40688993f3ed151143a26da55082db.zip |
Fix a pair of typos on Active Record Querying guide
-rw-r--r-- | guides/source/active_record_querying.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 76548a3397..da56d55deb 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1087,7 +1087,7 @@ Scopes Scoping allows you to specify commonly-used queries which can be referenced as method calls on the association objects or models. With these scopes, you can use every method previously covered such as `where`, `joins` and `includes`. All scope methods will return an `ActiveRecord::Relation` object which will allow for further methods (such as other scopes) to be called on it. -To define a simple scope, we use the `scope` method inside the class, passing the query that we'd like run when this scope is called: +To define a simple scope, we use the `scope` method inside the class, passing the query that we'd like to run when this scope is called: ```ruby class Post < ActiveRecord::Base @@ -1256,7 +1256,7 @@ creating a new record, but we don't want to include it in the query. So we want to find the client named "Andy", or if that client doesn't exist, create a client named "Andy" which is not locked. -We can achive this in two ways. The first is to use `create_with`: +We can achieve this in two ways. The first is to use `create_with`: ```ruby Client.create_with(locked: false).find_or_create_by(first_name: 'Andy') |