Ransack: NoMethodError: undefined method `construct_tables!' with Rails master

Created on 27 May 2020  路  9Comments  路  Source: activerecord-hackery/ransack

Ransack with rails master now throws this error.

The method was removed from rails recently with https://github.com/rails/rails/commit/590b045ee2c0906ff162e6658a184afb201865d7#diff-06059df8d3dee3101718fb2c01151ad0

Most helpful comment

Great, I'll merge it and will release it soon!

All 9 comments

Hi @spaghetticode did you find a workaround? I am upgrading right now and hit this issue. Thanks

@vitobotta not yet, actually I'm not using rails master at the moment and I have other urgencies, I hope somebody from the community will be able to take care of this.

Thanks @spaghetticode . I have removed Ransack for now since I don't have any complex forms.

@seanfcarroll Rails 6.1.0 RC1 has been released, is there a plan to update Polyamorous ActiveRecord monkey patches to make Ransack compatibile with Rails 6.1? I'd like to help but I don't think I have enough knowledge of ActiveRecord internals to do that 馃槄

I don't know if this is the best place to put that (sorry if not 馃槥 ), but there is an another incompatibility between rails 6.1.0.rc1 and ransack 2.3.2 :

wrong number of arguments (given 3, expected 2)

Ransack (polyamorous) : polyamorous (2.3.2) lib/polyamorous/activerecord_6.0_ruby_2/join_dependency.rb:32:in 'join_constraints'

def join_constraints(joins_to_add, alias_tracker)

Rails : activerecord (6.1.0.rc1) lib/active_record/relation/query_methods.rb:1272:in 'build_joins'

join_sources.concat(join_dependency.join_constraints(stashed_joins, alias_tracker, references_values))

Still need to clean it up, but If you can give https://github.com/activerecord-hackery/ransack/pull/1172 a try and let me know how it works with your apps on Rails 6.1.0.rc1, I appreciate it! :+1:.

Still need to clean it up, but If you can give #1172 a try and let me know how it works with your apps on Rails 6.1.0.rc1, I appreciate it! 馃憤.

Thank you so much @deivid-rodriguez 馃檹 , I'll try it in the next couple of days and let you know!

Still need to clean it up, but If you can give #1172 a try and let me know how it works with your apps on Rails 6.1.0.rc1, I appreciate it! 馃憤.

Thank you so much @deivid-rodriguez 馃檹 , I'll try it in the next couple of days and let you know!

@deivid-rodriguez works like a charm, awesome! Looking forward to a new release, thank you again! 馃憦 馃挭

Great, I'll merge it and will release it soon!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

llopez picture llopez  路  4Comments

seanfcarroll picture seanfcarroll  路  4Comments

seanfcarroll picture seanfcarroll  路  3Comments

mbajur picture mbajur  路  5Comments

maduhaime picture maduhaime  路  5Comments