aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-12-05 14:45:55 -0500
committerGitHub <noreply@github.com>2017-12-05 14:45:55 -0500
commit5f25b0aa7fafc1a91605117f8bce700466e0d663 (patch)
tree9c3ba6f649fbf475e6b646edf2a830b5556383ea
parent8f1db57f2d0f7d2cbb407f2c141dfd61ba8a599b (diff)
parent19c3c1c38f9500dee897d6e12d558d43e3fc4af0 (diff)
downloadrails-5f25b0aa7fafc1a91605117f8bce700466e0d663.tar.gz
rails-5f25b0aa7fafc1a91605117f8bce700466e0d663.tar.bz2
rails-5f25b0aa7fafc1a91605117f8bce700466e0d663.zip
Merge pull request #511 from ecbrodie/patch-1
Explicitly mentions the #and operator
-rw-r--r--README.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/README.md b/README.md
index 065bfea26c..3214dc16b3 100644
--- a/README.md
+++ b/README.md
@@ -150,7 +150,13 @@ The `OR` operator works like this:
users.where(users[:name].eq('bob').or(users[:age].lt(25)))
```
-The `AND` operator behaves similarly. Here is an example of the `DISTINCT` operator:
+The `AND` operator behaves similarly (same exact behaviour as chained calls to `.where`):
+
+```ruby
+users.where(users[:name].eq('bob').and(users[:age].lt(25)))
+```
+
+Here is an example of the `DISTINCT` operator:
```ruby
posts = Arel::Table.new(:posts)