diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-07 16:52:55 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-07 16:52:55 -0200 |
commit | 8d02afeaee8993bd0fde69687fdd9bf30921e805 (patch) | |
tree | 93cfbc3e5b18379c69abe6befa2bb3e78e542e86 /actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb | |
parent | 7b50dc5316f1db83b2d138a12bb0b0ab5ea90a33 (diff) | |
download | rails-8d02afeaee8993bd0fde69687fdd9bf30921e805.tar.gz rails-8d02afeaee8993bd0fde69687fdd9bf30921e805.tar.bz2 rails-8d02afeaee8993bd0fde69687fdd9bf30921e805.zip |
Rollback where.like and where.not_like
The real win with these chain methods is where.not, that takes care of
different scenarios in a graceful way, for instance when the given value
is nil.
where("author.id != ?", author_to_ignore.id)
where.not("author.id", author_to_ignore.id)
Both where.like and where.not_like compared to the SQL versions doesn't
seem to give us that much:
Post.where("title LIKE 'ruby on%'")
Post.where.like(title: 'ruby on%'")
Post.where("title NOT LIKE 'ruby on%'")
Post.where.not_like(title: 'ruby on%'")
Thus Rails is adding where.not, but not where.like/not_like and others.
Diffstat (limited to 'actionpack/test/controller/controller_fixtures/app/controllers/user_controller.rb')
0 files changed, 0 insertions, 0 deletions