Skip to content

Commit 6906179

Browse files
committed
Merge branch 'master' of github.com:andypike/rectify
2 parents 27d379e + 5d259cc commit 6906179

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Diff for: readme.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ class RegisterAccount < Rectify::Command
418418

419419
transaction do
420420
create_user
421-
notifiy_admins
421+
notify_admins
422422
audit_event
423423
send_user_details_to_crm
424424
end
@@ -434,7 +434,7 @@ class RegisterAccount < Rectify::Command
434434
# ...
435435
end
436436

437-
def notifiy_admins
437+
def notify_admins
438438
# ...
439439
end
440440

@@ -835,9 +835,7 @@ active_users_over_20 = ActiveUsers.new.merge(UsersOlderThan.new(20))
835835
active_users_over_20.count # => Returns number of active users over 20 years old
836836
```
837837

838-
If you have a long list of queries to compose, Rectify also comes with the class
839-
method `.merge` which takes multiple queries and combines them for you as if you
840-
used `|` (or `#merge`) on them all:
838+
The `.merge` class method of `Rectify::Query` accepts multiple `Rectify::Query` objects to union together. This is the same as using the `|` operator on multiple `Rectify::Query` objects.
841839

842840
```ruby
843841
active_users_over_20 = Rectify::Query.merge(
@@ -848,9 +846,7 @@ active_users_over_20 = Rectify::Query.merge(
848846
active_users_over_20.count # => Returns number of active users over 20 years old
849847
```
850848

851-
If you don't those options for composing queries then the final option would be
852-
to pass in a query object to another in it's constructor and use it as the base
853-
scope:
849+
You can also pass a `Rectify::Query` object into the constructor of another `Rectify::Query` object to set it as the base scope.
854850

855851
```ruby
856852
class UsersOlderThan < Rectify::Query

0 commit comments

Comments
 (0)