cm-admin 1.2.5 → 1.2.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: befa5f5406ee5c883398ac3a1134ff865c403bcdd4ffbea17a0845b55e58f728
|
4
|
+
data.tar.gz: a14fc15107042c6763a518588c12f67f6e5de3efff11b4af833c3e0728a07e0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e2b316707f6877476f0854b07d975a0ca5b5a6b594865227b2feea2b9c8569eb6338c567b7bf3b4aa08d7813897059619841e4ded430c505d9ccc508b6d606
|
7
|
+
data.tar.gz: ae93a4a2fabd6af3b99beae3a53e3b32fe05c4074f23230c6a8eff4157783806d274ccb8664e210c9baa301073da109612d6431c7618032382c783207fe49e27
|
data/Gemfile.lock
CHANGED
@@ -15,12 +15,13 @@ class CmAdmin::BulkActionProcessor
|
|
15
15
|
column_name = @model.available_fields[:index].first.field_name
|
16
16
|
begin
|
17
17
|
@current_action.code_block.call(id)
|
18
|
+
@error_message = nil
|
18
19
|
rescue NoMethodError, NameError => e
|
19
20
|
@error_message = "#{e.message.slice(0..(e.message.index(' for')))} at #{ar_object.send(column_name)}"
|
20
21
|
rescue ActiveRecord::RecordInvalid => e
|
21
22
|
@error_message = "#{e.message} at #{ar_object.send(column_name)}"
|
22
23
|
rescue StandardError => e
|
23
|
-
@error_message = e.message
|
24
|
+
@error_message = "#{ar_object.send(column_name)} - #{e.message}"
|
24
25
|
end
|
25
26
|
@invalid_records << OpenStruct.new({ row_identifier: ar_object.send(column_name), error_message: @error_message }) if @error_message
|
26
27
|
end
|
data/lib/cm_admin/version.rb
CHANGED
@@ -104,13 +104,15 @@ module CmAdmin
|
|
104
104
|
|
105
105
|
def attachment_list(form_obj, cm_field, _value, required_class, _target_action)
|
106
106
|
attached = form_obj.object.send(cm_field.field_name)
|
107
|
+
return if attached.instance_of?(Paperclip::Attachment)
|
108
|
+
|
107
109
|
content_tag(:div) do
|
108
110
|
if attached.class == ActiveStorage::Attached::Many
|
109
111
|
attached.each do |attachment|
|
110
112
|
concat attachment_with_icon(attachment)
|
111
113
|
end
|
112
114
|
else
|
113
|
-
concat attachment_with_icon(attached)
|
115
|
+
concat attachment_with_icon(attached) if attached
|
114
116
|
end
|
115
117
|
end
|
116
118
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sajinmp
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-10-
|
13
|
+
date: 2023-10-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|