cm-admin 1.5.6 → 1.5.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: c08303685e692e436d87fbb2a8166cd4438d9c100c52762790de4b002d23eb5d
4
- data.tar.gz: 3cf14b3c00d5ba8328657d9356269dd8548a62029625baf6798f4901b527caa7
3
+ metadata.gz: d2683d5547505d258f1bf7c0ea82236130ec6287ead5ab3670a29d909bc7a895
4
+ data.tar.gz: ad8a5db9a2a05d60ba04ced18d09591c56b78dc0cf849823c9a63b296ec43454
5
5
  SHA512:
6
- metadata.gz: a5e94ecac2756e8d09fc884ba66f1cb86c6347d0311755ec133ace630a9a3a4744a968322ce364e403c0c63995f1284cb901ea2476ee6a1d36fdf2c42b4949c7
7
- data.tar.gz: 94ff7a82c100ae96b006db7e3372bd63f803c9ab3cd61877606df7971f5f47d0d6b779fd66099d3e81fc11349ae1f0d53d2a10fc3bb334d272cb1d7e3726ceb7
6
+ metadata.gz: 7630c3561997e736dc4a0400d2c734d3e383545f11a5173061196fc84ab12b27322ac6f3945168db80e50713158d341534573632b148c3f682314c7a32fbdc0f
7
+ data.tar.gz: edef5e258984bdd78e2a195ad0434df645d13a8c8c4a84254ea9689b7ede1d1aaa6b0e1fad0a2e0ed87c415e1219f4406991411e8bb7f7dfc93b66a6f672ea4a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (1.5.5)
4
+ cm-admin (1.5.6)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -11,11 +11,11 @@ module CmAdmin
11
11
  records = "CmAdmin::#{@model.name}Policy::Scope".constantize.new(Current.user, @model.name.constantize).resolve
12
12
  records = apply_scopes(records)
13
13
  if (['table', 'card'].include?(params[:view_type]) || [:table, :card].include?(@current_action.view_type))
14
- @ar_object = filter_by(params, records, @model.filter_params(params))
14
+ @ar_object = filter_by(params, records, filter_params: @model.filter_params(params))
15
15
  elsif (request.xhr? && params[:view_type] == 'kanban') || @current_action.view_type == :kanban
16
16
  @ar_object = kanban_filter_by(params, records, @model.filter_params(params))
17
17
  else
18
- @ar_object = filter_by(params, records, @model.filter_params(params))
18
+ @ar_object = filter_by(params, records, filter_params: @model.filter_params(params))
19
19
  end
20
20
  respond_to do |format|
21
21
  if request.xhr? && (params[:view_type] == 'kanban' || @current_action.view_type == :kanban)
@@ -132,7 +132,7 @@ module CmAdmin
132
132
  @current_action = @action
133
133
  if @action.parent == 'index'
134
134
  records = apply_scopes(records)
135
- @ar_object = filter_by(params, records, @model.filter_params(params))
135
+ @ar_object = filter_by(params, records, filter_params: @model.filter_params(params))
136
136
  else
137
137
  resource_identifier
138
138
  end
@@ -236,7 +236,7 @@ module CmAdmin
236
236
 
237
237
  @associated_ar_object = if child_records.is_a? ActiveRecord::Relation
238
238
 
239
- filter_by(params, child_records, @ar_object, @associated_model.filter_params(params))
239
+ filter_by(params, child_records, parent_record: @ar_object, filter_params: @associated_model.filter_params(params))
240
240
  else
241
241
  child_records
242
242
  end
@@ -250,7 +250,7 @@ module CmAdmin
250
250
  records
251
251
  end
252
252
 
253
- def filter_by(params, records, parent_record = nil, filter_params={}, sort_params={})
253
+ def filter_by(params, records, parent_record: nil, filter_params: {}, sort_params: {})
254
254
  filtered_result = OpenStruct.new
255
255
  cm_model = @associated_model || @model
256
256
  db_columns = cm_model.ar_model&.columns&.map{|x| x.name.to_sym}
@@ -149,6 +149,6 @@ module CmAdmin
149
149
  CmAdmin.const_set "#{@name}Controller", klass
150
150
  end
151
151
 
152
-
152
+
153
153
  end
154
154
  end
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '1.5.6'
2
+ VERSION = '1.5.7'
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: 1.5.6
4
+ version: 1.5.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: 2024-05-29 00:00:00.000000000 Z
13
+ date: 2024-05-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: caxlsx_rails
@@ -498,7 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
498
498
  - !ruby/object:Gem::Version
499
499
  version: '0'
500
500
  requirements: []
501
- rubygems_version: 3.1.2
501
+ rubygems_version: 3.5.3
502
502
  signing_key:
503
503
  specification_version: 4
504
504
  summary: CmAdmin is a robust gem designed to assist in creating admin panels for Rails