rails_admin_import 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83c7b4f8595f9938d575df4a7550537d04eaa6d1dd52e9bf0d1adbbabd09df4e
4
- data.tar.gz: 1b74f9a44d0cffb8062d5efd7e016989ac2003b804329c9adfcb931320944178
3
+ metadata.gz: 8729f794b1c8ace3c08caeed84399b2ff8a997aeb7d623b05f132de9ac12ce94
4
+ data.tar.gz: bdb84ea9e8ad25667a74846581d0e34ac5570d76141e446c4d2e9a3752fe3e91
5
5
  SHA512:
6
- metadata.gz: 50d6d0ef870a078688946f7615eb863886e807a4375b4ea62471a64e13a60b12a91a5b6944b22eddd1d0d5809003ff37c64d330eed310285bb6e744430dc1096
7
- data.tar.gz: 0fc377a823623ca96162234f8604de9a71a03a527ac7929aaa49a6dc5a294a520d9bee1acda219b91c40b320556bdc5246cdc8823eb36d57b6a400f1aedb797e
6
+ metadata.gz: 3470647f410a12da9f6b8d5711ba1b2b49d24b9c3a3995dcb96fd8db306fe50a339a4480d46192b786e1053205285382eeac69850cab7bb6fb5f78631253931a
7
+ data.tar.gz: 9e6fba88b0fb93af73c05dd301db9a64ae0874c2d711817279454d3d104d9f3994c4cab12e02767d223defda77945f5e2c147adf78a1e5eb9daa787d1d1bfcd4
@@ -66,7 +66,7 @@ module RailsAdminImport
66
66
  if @config.mapping_key_list.present?
67
67
  @update_lookup_field_names = @config.mapping_key_list
68
68
  else
69
- @update_lookup_field_names ||= model_fields.map(&:name) + belongs_to_fields.map(&:foreign_key)
69
+ @update_lookup_field_names ||= model_fields.map(&:name) + belongs_to_fields.map(&:associated_primary_key)
70
70
  end
71
71
  end
72
72
 
@@ -205,10 +205,10 @@ module RailsAdminImport
205
205
 
206
206
  if object.nil?
207
207
  object = model.new
208
- perform_model_callback(object, :before_import_attributes, record)
208
+ perform_model_callback(object, :before_import_attributes, new_attrs)
209
209
  object.attributes = new_attrs
210
210
  else
211
- perform_model_callback(object, :before_import_attributes, record)
211
+ perform_model_callback(object, :before_import_attributes, new_attrs)
212
212
  object.attributes = new_attrs.except(update.map(&:to_sym))
213
213
  end
214
214
  object
@@ -1,3 +1,3 @@
1
1
  module RailsAdminImport
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
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.0
4
+ version: 3.0.1
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-01-29 00:00:00.000000000 Z
12
+ date: 2022-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.7.6
124
+ rubygems_version: 3.1.6
126
125
  signing_key:
127
126
  specification_version: 4
128
127
  summary: Import functionality for Rails Admin