aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_querying.md
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-11-03 01:56:16 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-11-03 01:56:16 +0530
commit3b0bb08699ce409b8213c82956dc34086dcbc8b9 (patch)
tree34398e3421fcfd86aab2b5fc757175dd2ce7664d /guides/source/active_record_querying.md
parent974467d70d337d4c60414c792e275d367143217b (diff)
parentee917493e451e552fef18367f8bcba2f36080685 (diff)
downloadrails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.tar.gz
rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.tar.bz2
rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md
Diffstat (limited to 'guides/source/active_record_querying.md')
-rw-r--r--guides/source/active_record_querying.md4
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')