Did someone succesfully run ransack with AR 5.2? Build is failing on rails master branch(actually it's failing everywhere). Is someone working on that?
It's an underlying issue over here.
Also in lib/ransack/adapters/active_record/context.rb:282 pass 3 args to JoinDependency.new but with Rails 5.2.0.beta2 seems the constructor take 4.
@pioz Haha, I just ended up in the same rabbit hole as you. You win :) Let me link to the lines:
3 arguments passed here:
https://github.com/activerecord-hackery/ransack/blob/724d020442dad60a1a6d9e00bbae7681350c9fb1/lib/ransack/adapters/active_record/context.rb#L282-L284
4 required here:
Also, this override in ransack accepts an argument:
But the original in Rails no longer takes an argument:
Also the join_root method used in https://github.com/activerecord-hackery/ransack/blob/724d020442dad60a1a6d9e00bbae7681350c9fb1/lib/ransack/adapters/active_record/ransack/context.rb#L34
is become protected:
So I have working version for me:
https://github.com/spark-solutions/polyamorous
and
https://github.com/spark-solutions/ransack
Not sure if it is the same issue, but a branch of Ransack based on Polyamorous is available here for testing. https://github.com/activerecord-hackery/ransack/pull/858
Closed as fixed by https://github.com/activerecord-hackery/ransack/pull/868
Most helpful comment
So I have working version for me:
https://github.com/spark-solutions/polyamorous
and
https://github.com/spark-solutions/ransack