cm-admin 1.4.4 → 1.4.5

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: 111a7989194da82d40d228465f63a6cd20142e17510b10debbd23f6036c70cf7
4
- data.tar.gz: ed711867e9c03d15fe18d74c44dc802332c8e044ed4a6132007f2a71ff6034d7
3
+ metadata.gz: 00cd64c6ef60a6e6a8764533d677a742765dc47b30db30fb64e302d350faaaac
4
+ data.tar.gz: 6a9ab9b8dd72eedf62c31892753103f1c73570ff3a17c6cea60edddfaa52f9b1
5
5
  SHA512:
6
- metadata.gz: ce7e56508d5482eb781bf7315b43d90ab49542f89b3e9f66734d85834f72157da858a0edd1a6566da4438cf96850637fb9ca37632f87a58005ad391d3fcfd409
7
- data.tar.gz: 918556deeefdb621deb50e6715992f255638060bce3f448b0c7ed0d322c60d5251a81de35bacbc4b73ccae4eb943c55359b09cde1b750a76ef4fee59fe1d4e29
6
+ metadata.gz: 02c38abf40ff1651525e1b103bafaf920e18a320abd5fc631779fa6b5d99944bc9546c1145ddfa2a0cd2ef5b78b94eab45fb06b012d66fc74e64e3550d24b8ad
7
+ data.tar.gz: 63051f6070b8ab489b3d6e55b397cdb7e7e8402284d3436c80cb46d821613a62303544acee2fd0c9bc876bd3631062f9191d3d11334cd50d2b0b461aabe9dc8f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (1.4.4)
4
+ cm-admin (1.4.5)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -18,6 +18,7 @@ import 'flatpickr'
18
18
  import 'jgrowl'
19
19
  import Select2 from "select2"
20
20
  Select2()
21
+ jqueryJgrowl()
21
22
 
22
23
  // import '@nathanvda/cocoon'
23
24
  import 'daterangepicker'
@@ -38,7 +39,7 @@ document.addEventListener("turbo:load", function () {
38
39
  $('.select-2').select2({
39
40
  theme: "bootstrap-5",
40
41
  });
41
- jqueryJgrowl()
42
+
42
43
  });
43
44
 
44
45
  $(document).on('click', '.menu-item', function(e) {
@@ -5,7 +5,7 @@
5
5
  p.table-top__total-count = "#{humanized_ar_collection_count(@associated_ar_object.pagy.count, @action.child_records.to_s)}"
6
6
  .table-top__column-action
7
7
  - if @associated_model && @associated_model.available_actions.map(&:name).include?('new') && has_valid_policy(@associated_ar_object, 'new')
8
- - association = @ar_object.class.reflect_on_all_associations.select{|x| x.name == @associated_model.name.tableize.to_sym }.first
8
+ - association = @ar_object.class.reflect_on_all_associations.select{|x| x.name == @associated_model.name.tableize.to_sym }.first
9
9
  - polymorphic_name = (association && association.inverse_of && association.inverse_of.options[:polymorphic]) ? association.inverse_of.name : ''
10
10
  a href="#{CmAdmin::Engine.mount_path}/#{@associated_model.name.tableize}/new?associated_id=#{@ar_object.id}&associated_class=#{@ar_object.class.name.underscore}&polymorphic_name=#{polymorphic_name}&referrer=#{request.path}"
11
11
  button.btn-secondary Add
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '1.4.4'
2
+ VERSION = '1.4.5'
3
3
  end
@@ -142,7 +142,7 @@ module CmAdmin
142
142
 
143
143
  def attachment_list(form_obj, cm_field, _value, required_class, _target_action)
144
144
  attached = form_obj.object.send(cm_field.field_name)
145
- return if attached.instance_of?(Paperclip::Attachment)
145
+ return if defined?(::Paperclip) && attached.instance_of?(::Paperclip::Attachment)
146
146
 
147
147
  content_tag(:div) do
148
148
  if attached.class == ActiveStorage::Attached::Many
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.4.4
4
+ version: 1.4.5
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: 2024-02-09 00:00:00.000000000 Z
13
+ date: 2024-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: caxlsx_rails