stephskardal / rails_admin_import

Rails Admin Import functionality
http://www.endpoint.com/
MIT License
160 stars 122 forks source link

undefined method `foreign_key' #122

Closed gustavo-iha closed 2 years ago

gustavo-iha commented 2 years ago

I have an application with the following specs:

When I open the "Import" tab on a rails_admin record it raises an error.

image

Full error description: full-error-description.txt

monkbroc commented 2 years ago

@Wowu @codealchemy have you run into this issue with rails_admin 3.0.0? It was working with rails_admin 3.0.0 beta in #120

codealchemy commented 2 years ago

@monkbroc I'm not using it on any current projects, though https://github.com/railsadminteam/rails_admin/commit/3f676371ce7fc088220095afa12d3e20c2c6123a may be related (foreign_key was removed from association - in which case this error may be reproducible on 3.0.0 beta builds, I could be missing something but I don't see any tests here that cover rendering the template where this is raised)

monkbroc commented 2 years ago

Ah cool, it might just be a switch from foreign_key to associated_primary_key

monkbroc commented 2 years ago

I published rails_admin_import version 3.0.1 with a fix for this. Let me know if that works for you!