diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-12-05 14:45:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 14:45:55 -0500 |
commit | 5f25b0aa7fafc1a91605117f8bce700466e0d663 (patch) | |
tree | 9c3ba6f649fbf475e6b646edf2a830b5556383ea | |
parent | 8f1db57f2d0f7d2cbb407f2c141dfd61ba8a599b (diff) | |
parent | 19c3c1c38f9500dee897d6e12d558d43e3fc4af0 (diff) | |
download | rails-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.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) |