From cd1760574e60432104360f1126d41f401310c4f6 Mon Sep 17 00:00:00 2001 From: KIMURA Takahiro Date: Tue, 4 Jun 2024 08:00:09 +0900 Subject: [PATCH 1/3] Disable turbo on import form to show flash messages https://github.com/stephskardal/rails_admin_import/issues/141 --- app/views/rails_admin/main/import.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/rails_admin/main/import.html.erb b/app/views/rails_admin/main/import.html.erb index 70f7e2c..9726e9e 100644 --- a/app/views/rails_admin/main/import.html.erb +++ b/app/views/rails_admin/main/import.html.erb @@ -11,7 +11,7 @@ %> <%= render "results" %> -<%= form_tag import_path(@abstract_model), :multipart => true, class: 'form-horizontal denser' do %> +<%= form_tag import_path(@abstract_model), :multipart => true, class: 'form-horizontal denser', data: { turbo: false } do %> /
From 8d1e2db466813dd9222c71f52ce8dffe528d0f3a Mon Sep 17 00:00:00 2001 From: KIMURA Takahiro Date: Tue, 4 Jun 2024 08:03:49 +0900 Subject: [PATCH 2/3] Fix checkbox appearance --- app/views/rails_admin/main/import.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/rails_admin/main/import.html.erb b/app/views/rails_admin/main/import.html.erb index 9726e9e..995120e 100644 --- a/app/views/rails_admin/main/import.html.erb +++ b/app/views/rails_admin/main/import.html.erb @@ -53,7 +53,7 @@ <%= t("admin.import.update_if_exists") %>
- <%= check_box_tag :update_if_exists, '1', RailsAdminImport.config.update_if_exists, :class => "form-control" %> + <%= check_box_tag :update_if_exists, '1', RailsAdminImport.config.update_if_exists %>

<%= t('admin.import.help.update_if_exists') %>

From 91a8d537bd11a5fd3dd2771cd6cbb75f195b03e2 Mon Sep 17 00:00:00 2001 From: KIMURA Takahiro Date: Tue, 4 Jun 2024 09:00:38 +0900 Subject: [PATCH 3/3] Use factory_bot version 6.3 which supports ruby 2.7 --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 68d1af0..fc4ab30 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,7 @@ group :test do gem 'rspec', '~> 3.10' gem 'rspec-rails', '~> 5.0' gem 'factory_bot_rails', '~> 6.2' + gem 'factory_bot', '< 6.4' gem 'database_cleaner-active_record', require: false gem 'database_cleaner-mongoid', require: false end