cm-admin 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78211818c7078c8cf9723ca166d19c9eaea3155544754a60fca317a8eaf86276
4
- data.tar.gz: 7a53125a99db46cc8a7686076baf674eb971f20430bf680c5c0e105b06c89dc1
3
+ metadata.gz: 9bcc252aa00bb8dac32547d85cf1fd53c72a4c9726b3e092389e9ad1ef464095
4
+ data.tar.gz: 4c5c3d415f82750e64ab281791a90ed8a1069b52e136f399fca6baabe34a9bb0
5
5
  SHA512:
6
- metadata.gz: a2da45fd35ae854471c2c0255359fc96df661ebcb482c452a65734daf3364465bfe7cbb5250488a13be7381a7c129af90288b31d5c364c65bd878523ed8c75b8
7
- data.tar.gz: a7ed71594d873f6c525577f2f19a48efe68bb873f331ab9b49bec2b18b980ea03bdd86fcbd8d0d83d2eb78bb3a3805e97626806c83ac43b138b88dc376638335
6
+ metadata.gz: d9c004225ef93e480ff61f4f1a244639afbab8fcdd532295f4cd459b8e693429f6a62810871a0f3a7bdcba67c42883c6fdf069b983ccd2e8ffc244af536212b6
7
+ data.tar.gz: f49305ebbc5e40be87ab257273e26a2c51fffa497f6dd9ae4831cfb17d6c07f1a4e98ce629337b0ce0e8925d10a4c8147a0079f8b86b380c96860722507e023b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-admin (2.4.0)
4
+ cm-admin (2.4.1)
5
5
  caxlsx_rails
6
6
  cocoon (~> 1.2.15)
7
7
  csv-importer (~> 0.8.2)
@@ -9,6 +9,6 @@ ul.tabs
9
9
  - else
10
10
  = link_to tab_display_name(nav_item.nav_item_name), cm_admin.send("#{@ar_object.model_name.singular}_#{nav_item_action_name}_path", @ar_object), class: "nav-link #{ nav_item_action_name == action_name ? 'active' : ''}"
11
11
  // current_action_name is defined when action trail is added to that model
12
- - if policy([:cm_admin, @model.name.classify.constantize]).send(:history?)
12
+ - if policy([:cm_admin, @model.name.classify.constantize]).send(:history?) && cm_admin.respond_to?("#{@ar_object.model_name.singular}_history_path".to_sym)
13
13
  li.nav-item
14
- = link_to 'History', cm_admin.send("#{@ar_object.model_name.singular}_history_path", @ar_object), class: "nav-link #{ action_name == 'history' ? 'active' : ''}"
14
+ = link_to 'History', cm_admin.send("#{@ar_object.model_name.singular}_history_path", @ar_object), class: "nav-link #{ action_name == 'history' ? 'active' : ''}"
@@ -1,3 +1,3 @@
1
1
  module CmAdmin
2
- VERSION = '2.4.0'
2
+ VERSION = '2.4.1'
3
3
  end
@@ -44,7 +44,7 @@ module CmAdmin
44
44
  has_scoped_record = if current_action_name == 'index'
45
45
  scoped_model.present?
46
46
  else
47
- scoped_model.find_by(id: params[:id]).present?
47
+ scoped_model.find_by(id: @ar_object.id).present?
48
48
  end
49
49
  return unless custom_action.display_if.call(@ar_object) && has_scoped_record
50
50
 
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: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael
@@ -11,10 +11,10 @@ authors:
11
11
  - Pranav
12
12
  - Mahaveer
13
13
  - Austin
14
- autorequire:
14
+ autorequire:
15
15
  bindir: exe
16
16
  cert_chain: []
17
- date: 2024-10-14 00:00:00.000000000 Z
17
+ date: 2024-10-15 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: caxlsx_rails
@@ -507,7 +507,7 @@ licenses:
507
507
  metadata:
508
508
  homepage_uri: https://github.com/commutatus/cm-admin
509
509
  source_code_uri: https://github.com/commutatus/cm-admin
510
- post_install_message:
510
+ post_install_message:
511
511
  rdoc_options: []
512
512
  require_paths:
513
513
  - lib
@@ -523,7 +523,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
523
523
  version: '0'
524
524
  requirements: []
525
525
  rubygems_version: 3.5.16
526
- signing_key:
526
+ signing_key:
527
527
  specification_version: 4
528
528
  summary: CmAdmin is a robust gem designed to assist in creating admin panels for Rails
529
529
  applications