aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Brodie <ecbrodie@users.noreply.github.com>2017-12-05 13:48:34 -0500
committerGitHub <noreply@github.com>2017-12-05 13:48:34 -0500
commit19c3c1c38f9500dee897d6e12d558d43e3fc4af0 (patch)
tree9c3ba6f649fbf475e6b646edf2a830b5556383ea
parent8f1db57f2d0f7d2cbb407f2c141dfd61ba8a599b (diff)
downloadrails-19c3c1c38f9500dee897d6e12d558d43e3fc4af0.tar.gz
rails-19c3c1c38f9500dee897d6e12d558d43e3fc4af0.tar.bz2
rails-19c3c1c38f9500dee897d6e12d558d43e3fc4af0.zip
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)