-
Couldn't load subscription status.
- Fork 5
Description
Rails 4.2 changed some internals of ActiveRecord query-building, so your code for or-conditions doesn't work. More specifically, or_query method in manager.rb fails to build a valid query.
The problem is that setting where_values does not affect bind_values, and the
latter doen't fill all of the ? slots in the resulting query.
I was able to work around the issue by applying the following patch:
https://gist.github.com/remigijusj/65ce558215292b85948b
However it doesn't quite work with and-joined or conditions (see filter_by_params!)
I could find little info about the change in ActiveRecord. Some links here:
http://qiita.com/joker1007/items/5c851526e73b3bc0273a
http://stackoverflow.com/questions/27627390/or-operator-in-where-clause-with-arel-in-rails-4-2