effective_resources 1.4.1 → 1.4.2

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: 4f1c06db29b4f36ce235cbbc88f563a2f88061b140b4dd431c37e3e055c2a5f7
4
- data.tar.gz: 89b4a38744dc72283e00067ac8e6e0e027ea1c22a3b4214ef0eb687b5dd8e4d0
3
+ metadata.gz: ff6e03737c18a9e9888a49ad8987331fbd6e7b0c71fe6a0e7796609f082431c3
4
+ data.tar.gz: 590a315a119da6dd51ce63307a9e6e3b27c3063b0cf6c4b1f0979128a2394c45
5
5
  SHA512:
6
- metadata.gz: bb1fe32288633b8b0f2e6ff290769709e72b7c2d77d1eca1267e9b776313fc5d1d76148774d313eb373eacca2d6127496afa8d5156c80df0058a8e9fea7a429f
7
- data.tar.gz: f82e995fe3dc57d86be8e2a6328deece5c702ee9471616c3b1857df87f87dabcede3fb80837af22529f14b9aaf6e75cd1722885c5129a9ee88ff6df9d5c7e310
6
+ metadata.gz: 75c617f4f7a8f588e2728bfe1b1f696093d5391aae9e3a4158bae60598da6f8b4ae1643bcc679a18423d41b7f4f5b62934f44993a003b720b057da1b756cf34e
7
+ data.tar.gz: 4b2c0f0f3e661d10813845258c8c8132d532962384e9b1408239f0d12d42c187a8cd2ed0b563e5625a9efd564c79dcaf5609097c284167405dc3c44f727272a2
@@ -4,7 +4,7 @@ module EffectiveResourcesPrivateHelper
4
4
  REPLACE_PAGE_ACTIONS = {'update' => :edit, 'create' => :new}
5
5
 
6
6
  def permitted_resource_actions(resource, actions)
7
- page_action = REPLACE_PAGE_ACTIONS[params[:action]] || params[:action]&.to_sym || :save
7
+ page_action = REPLACE_PAGE_ACTIONS[params[:action]] || params[:action].try(:to_sym) || :save
8
8
  executor = Effective::ResourceExec.new(self, resource)
9
9
 
10
10
  actions.select do |commit, args|
@@ -113,7 +113,7 @@ module ActsAsStatused
113
113
  end
114
114
 
115
115
  self.status_steps["#{status}_at".to_sym] ||= Time.zone.now
116
- self.status_steps["#{status}_by".to_sym] ||= current_user&.id
116
+ self.status_steps["#{status}_by".to_sym] ||= current_user.try(:id)
117
117
  end
118
118
 
119
119
  validates :status, presence: true, inclusion: { in: const_get(:STATUSES).map(&:to_s) }
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '1.4.1'.freeze
2
+ VERSION = '1.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-07 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails