Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord 5.2 Support #849

Closed
bbonislawski opened this issue Dec 9, 2017 · 9 comments
Closed

ActiveRecord 5.2 Support #849

bbonislawski opened this issue Dec 9, 2017 · 9 comments

Comments

@bbonislawski
Copy link

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?

@halo
Copy link

halo commented Dec 12, 2017

It's an underlying issue over here.

@pioz
Copy link

pioz commented Dec 12, 2017

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.

@halo
Copy link

halo commented Dec 12, 2017

@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:

join_dependency = JoinDependency.new(
relation.klass, association_joins, join_list
)

4 required here:

https://github.com/rails/rails/blob/38b2904f2c9d89868e96edd71c5f3143ca235a88/activerecord/lib/active_record/associations/join_dependency.rb#L91

@halo
Copy link

halo commented Dec 12, 2017

Also, this override in ransack accepts an argument:

But the original in Rails no longer takes an argument:

https://github.com/rails/rails/blob/38b2904f2c9d89868e96edd71c5f3143ca235a88/actionview/lib/action_view/helpers/tags/base.rb#L38

@pioz
Copy link

pioz commented Dec 12, 2017

@bbonislawski
Copy link
Author

So I have working version for me:
https://github.com/spark-solutions/polyamorous
and
https://github.com/spark-solutions/ransack

@scarroll32
Copy link
Member

@scarroll32
Copy link
Member

Not sure if it is the same issue, but a branch of Ransack based on Polyamorous is available here for testing. #858

@scarroll32
Copy link
Member

Closed as fixed by #868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants