Commit Graph

24 Commits

Author SHA1 Message Date
David Rodríguez feed41cb8a
Drop Rails 5.2 support 2022-03-07 14:05:29 +01:00
Daniel P. Clark 0e2ed0d41f
Resolves issue #1245 2021-08-25 11:38:04 -04:00
David Rodríguez 93615c3b93
Adapt to quoting change 2020-11-20 15:48:27 +01:00
nhuthuy-1719 f7225de3cd Fixes #82 Case Insensitive Searching 2019-11-05 22:54:02 +07:00
Alex Leschenko 05e51e8d53 Fix custom predicates with 'not_in' arel predicate
Query with predicates defined with 'not_in' arel predicate results with an error "TypeError: can't quote Array"
  activerecord-5.2.2/lib/active_record/connection_adapters/abstract/quoting.rb:179:in `_quote'
2019-05-13 15:02:33 +03:00
Akira Matsuda 7bcc903bb7 ⚠️ shadowing outer local variable - predicate 2018-02-02 19:13:54 +09:00
Akihiro MATSUMURA a930113f2a Fix search not_null with association 2017-06-01 16:54:53 +09:00
camelmasa ba94e69385 Fix value when several predicate.right 2016-07-02 14:18:16 +09:00
Andrew Vit 96d0fd75ad Query for negative associations as subquery
When a collection association (has_many, etc) is searched for negative
conditions (NOT...), a JOIN will still include other rows that match.

The implied meaning is that it should only select where *none* of the
associations match, but the actual result still selects records where
*any* of the joined associations match.

This implementation removes joins that were added while building the
conditions and moves them into a subquery if needed.
2016-02-16 12:01:12 -08:00
Andrew Vit 55e56acd0a Confusing private arguments and method names 2016-02-16 11:59:06 -08:00
Andrew Vit 00631f969d Refactor: inline private method 2016-02-16 11:56:17 -08:00
Jon Atack b36bdc23b1 Clearer method and method call not in iteration 2015-04-12 22:18:36 +05:30
Jared Beck 90548b4ce3 Fix NoMethodError in casted_array_with_in_predicate?
[Fixes #504]

The right-hand side of an IN predicate does not always respond
to :val.  For example, it might be a subquery, represented by
a SelectManager.
2015-01-30 17:39:15 -05:00
jonatack 3add178bd2 Refactor Nodes::Condition 2015-01-16 11:40:40 +01:00
jonatack 6c59e96ada Follow-up to #488. Fix for #492 and #493.
This is a patch to address a regression in v1.6.0
caused by a missing test on a fix, and probably
needs a deeper look.

TODO: Put the test in a more logical place.
2015-01-14 12:50:40 +01:00
jonatack f83b8b958b Update FIXME comment with all the PRs [skip ci] 2015-01-07 22:19:17 +01:00
jonatack f23463a23c Simplify to one in-place mutation. Follow-up to #488. 2015-01-06 01:28:28 +01:00
Idean Labib 6dc6ebde70 [472] Allow string arrays by using build_quoted for strings in arrays 2015-01-04 16:39:51 -08:00
Jon Atack c16ab7a4b3 Follow up to #486: Extract to private methods, document
the reason behind this patch and add a FIX ME comment to encourage PRs
to improve it.
2015-01-04 13:28:10 +01:00
Idean Labib 9631f1de85 make tests pass by adding to if statement 2015-01-03 15:15:26 -08:00
Idean Labib 02ac87672e Allow arrays to be received for custom ransacker 2015-01-02 20:04:52 -08:00
Jon Atack 29428ae481 Remove unneeded namespacing 2014-11-21 20:03:20 +01:00
Zhomart Mukhamejanov 12e1e4d4f0 new AR codes moved to inside adapters/active_record 2014-10-31 11:36:23 -07:00
Zhomart Mukhamejanov e5b6014a53 ActiveRecord and Arel abstracted 2014-07-31 23:36:12 -07:00