effective_resources 1.4.1 → 1.4.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff6e03737c18a9e9888a49ad8987331fbd6e7b0c71fe6a0e7796609f082431c3
|
4
|
+
data.tar.gz: 590a315a119da6dd51ce63307a9e6e3b27c3063b0cf6c4b1f0979128a2394c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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]
|
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
|
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) }
|
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.
|
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
|
+
date: 2019-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|