cm-admin 3.0.13 → 3.0.14

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: b67f05a0ab6f311c51a18ff643b6de46aa3d9cf27582ee0edffc494f67db9d08
4
- data.tar.gz: 05f13ddf138f740c0ccf1a822d0c135a25f2c73c281a7e5e62809c9dbc05a84c
3
+ metadata.gz: df3fadb7ab461116a44e122cd8ec236b43841f501c898cfea6faa4ca898ef982
4
+ data.tar.gz: 2c4bc421eebb4ebd67242ae920f4e2d29170606525a72fc57f1807a3aa557e66
5
5
  SHA512:
6
- metadata.gz: 497a5ddaed220d3c4067dd446f9e4280d8501cad4a3db1ee69eacb55400ececbe4d7487c70a1d98de8878316aa13e54f5fd2b5f69c973cdec15041213e39eaa6
7
- data.tar.gz: e3878f99744771632245b8fbbd91b46d08952f6e6887665410011422d9ce0669bb7e50374f1e34e442b5c22e126f7f5871c12cbcb88e07894cccd8c95115acc6
6
+ metadata.gz: e8cb857fe0f0d2b673223a9b364b73b0049206dbeaa109f954db6cd483fa6873bafe66000ee2393311d881efa2dcd9d901003fad5766918013044f9bf4a65680
7
+ data.tar.gz: 98bac5325e98387bacb6fc03be9dd880c74410c2bfd48d20eaf90784014c2eaa23393544a2564de2fad95bf0bb6e9716cbdcc4a7b271d5c4d6c8abdd0ae44a2d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (3.0.13)
4
+ cm-admin (3.0.14)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -6,11 +6,9 @@ require 'cm_admin/view_helpers'
6
6
 
7
7
  module CmAdmin
8
8
  class ExportsController < ApplicationController
9
-
10
9
  def export
11
10
  file_path = CmAdmin::Models::Export.generate_excel(params[:class_name], params, helpers)
12
11
  send_file file_path, disposition: 'attachment'
13
12
  end
14
-
15
13
  end
16
14
  end
@@ -6,7 +6,7 @@
6
6
  h4 = action_title
7
7
  .entity-header__actions
8
8
  - if @model.current_action.name == 'index'
9
- - if has_valid_policy(@ar_object, :exportable)
9
+ - if has_valid_policy(@ar_object, :export)
10
10
  .export-container
11
11
  .dropdown
12
12
  button.btn-secondary.dropdown-toggle data-bs-toggle='dropdown'
@@ -38,7 +38,11 @@ module CmAdmin
38
38
  custom_action_modal: {
39
39
  verb: :get,
40
40
  path: ':id/custom_action_modal/:action_name'
41
+ },
42
+ export: {
43
+ verb: :post,
44
+ path: 'export_to_file'
41
45
  }
42
- }
43
- REJECTABLE_FIELDS = %w(id created_at updated_at)
46
+ }.freeze
47
+ REJECTABLE_FIELDS = %w[id created_at updated_at].freeze
44
48
  end
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '3.0.13'
2
+ VERSION = '3.0.14'
3
3
  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: 3.0.13
4
+ version: 3.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: exe
16
16
  cert_chain: []
17
- date: 2024-11-06 00:00:00.000000000 Z
17
+ date: 2024-11-08 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: caxlsx_rails