diff options
author | Evan Brodie <ecbrodie@users.noreply.github.com> | 2017-12-05 13:48:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 13:48:34 -0500 |
commit | 19c3c1c38f9500dee897d6e12d558d43e3fc4af0 (patch) | |
tree | 9c3ba6f649fbf475e6b646edf2a830b5556383ea | |
parent | 8f1db57f2d0f7d2cbb407f2c141dfd61ba8a599b (diff) | |
download | rails-19c3c1c38f9500dee897d6e12d558d43e3fc4af0.tar.gz rails-19c3c1c38f9500dee897d6e12d558d43e3fc4af0.tar.bz2 rails-19c3c1c38f9500dee897d6e12d558d43e3fc4af0.zip |
Explicitly mentions the #and operator
-rw-r--r-- | README.md | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |