rails_admin_import 3.0.2 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6c5950fbf60618a001ef18c46c8331faf75113cfdf3342b17268b00dd5be46d
4
- data.tar.gz: 37b6f77d11d21c8c6f38dd45a3826beb2386e1f4616c929d5d7d289bf3ee77f3
3
+ metadata.gz: 2129efc09b052a10e11c22a99bb4530542f6a279e0eaf79a8cfa2bedd0d13033
4
+ data.tar.gz: a01b1898b5827b8767e654de83526415cf880561954dbcbc30c52e4f8f7cb49e
5
5
  SHA512:
6
- metadata.gz: b763676e2157bf7c352633aee545766fe38e9cb97ac75d8bd2edfca5dced0a839f0ede5a6100569f9757a4dc8e5601a93daf89028b61da94b7e56034d79494a9
7
- data.tar.gz: f934b8e2f28165b793fdf6f78e5d6b591dbaeef7a8eab8fce94b4f0574a5137025fa3834c9a7131c5f9dbe4bc8cca52ffd85fa726bfa4b783c241407a9c8a03e
6
+ metadata.gz: 3bb07e6ac01f026572ff68e8f26e2f638372fc588b1a52e2ae5f3a2bf00e312b4c67910ef4b44943781bf54f3293cc1db9887041b2d40090a487373fa78c1480
7
+ data.tar.gz: 3d83e1d6725b101e648b1510e29a38d9a9d756f8f61d7177b6238788e5b943a2b2e6baae9f892ceb0c11736c7b13a72145df896a6f737e601e11f4f098563be9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Change Log
2
2
 
3
+ # 3.0.4 / 2024-06-04
4
+
5
+ - Fix missing flash messages. Thanks @nanjakkun
6
+
7
+ # 3.0.3 / 2022-04-22
8
+
9
+ - Allow importing false values. Thanks @Wowu
10
+
11
+ # 3.0.2 / 2022-04-17
12
+
13
+ - Calculate the `new_attrs` after the `before_import_attributes` hook
14
+ - Fix GitHub Actions CI
15
+ - Bump Nokogiri in tests
16
+
17
+ # 3.0.1 / 2022-04-10
18
+
19
+ - pass `new_attrs` instead of record to `before_import_attributes` hook. Thanks @Wowu
20
+ - Use `associated_primary_key` for models with associations (compat fix for Rails Admin 3.x)
21
+ - Bump Nokogiri in tests
22
+
3
23
  # 3.0.0 / 2022-01-29
4
24
 
5
25
  - BREAKING CHANGE: Templates are now compatible with Rails Admin 3.x. For Rails Admin 2.x, continue using version 2.3.1. Thanks @Wowu
@@ -11,7 +11,7 @@
11
11
  %>
12
12
 
13
13
  <%= render "results" %>
14
- <%= form_tag import_path(@abstract_model), :multipart => true, class: 'form-horizontal denser' do %>
14
+ <%= form_tag import_path(@abstract_model), :multipart => true, class: 'form-horizontal denser', data: { turbo: false } do %>
15
15
  <input name="send_data" type="hidden" value="true">/</input>
16
16
  <fieldset>
17
17
  <legend>
@@ -53,7 +53,7 @@
53
53
  <%= t("admin.import.update_if_exists") %>
54
54
  </label>
55
55
  <div class="col-sm-10 controls">
56
- <%= check_box_tag :update_if_exists, '1', RailsAdminImport.config.update_if_exists, :class => "form-control" %>
56
+ <%= check_box_tag :update_if_exists, '1', RailsAdminImport.config.update_if_exists %>
57
57
  <p class="help-block">
58
58
  <%= t('admin.import.help.update_if_exists') %>
59
59
  </p>
@@ -206,7 +206,7 @@ module RailsAdminImport
206
206
 
207
207
  field_names = import_model.model_fields.map(&:name)
208
208
  new_attrs = record.select do |field_name, value|
209
- field_names.include?(field_name) && !value.blank?
209
+ field_names.include?(field_name) && (!value.blank? || value == false)
210
210
  end
211
211
 
212
212
  if object.new_record?
@@ -1,3 +1,3 @@
1
1
  module RailsAdminImport
2
- VERSION = "3.0.2"
2
+ VERSION = "3.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steph Skardal
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-18 00:00:00.000000000 Z
12
+ date: 2024-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.1.6
124
+ rubygems_version: 3.3.5
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Import functionality for Rails Admin