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

Update error messages not showing #142

Open
obreil54 opened this issue Mar 18, 2024 · 2 comments
Open

Update error messages not showing #142

obreil54 opened this issue Mar 18, 2024 · 2 comments

Comments

@obreil54
Copy link

Hello, I know this gem is not actively maintained but I wanted to see if anyone is having the same issue and if there is a fix I can implement.

config.configure_with(:import) do |config|
config.update_if_exists = true
config.rollback_on_error = true
end

So this is a part of what I have in my config file, the issue I am experiencing is that when it updates a record rather than creates a new one and the record it's trying to update is not passing a validation, it correctly does not update the record, however it still gives a success message which is very confusing for the user. Does anyone have a fix for this?

Additionally, in my import form the checkbox for update_if_exists just comes up on my screen as a strange line field which cannot be interracted with instead of the checkbox I can see it's supposed to be from the HTML.

@monkbroc
Copy link
Collaborator

Hi. If you can fix the issue you describe, I will happily merge the PR and release a new version of the gem.

@dimvic
Copy link

dimvic commented Aug 9, 2024

The problem should be that the import form has been customized and data-turbo="false" was not added to the form tag in views/rails_admin/main/import after the upgrade.

<%= form_tag import_path(@abstract_model), :multipart => true, class: 'form-horizontal denser', data: { turbo: false } do %>

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

3 participants