effective_resources 0.9.3 → 0.9.4
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7774a1c7c137c547e858f83a91a78eb25bc8df4
|
|
4
|
+
data.tar.gz: e507c069d263242df7a09437f059c090f4c62c3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c61c1927a15d8793813b9bea397fe08fc5efd1aedb5bea2643dd1119e6633805da4a34f7be4b3b1fba5fd6a02fbbd7b1c7f9d42c03ba39caef991348d1e9c989
|
|
7
|
+
data.tar.gz: 9d2d1f684ef0766822c4da823efb2195956e8e9b5e9633f27619fde23f7609ba4b59c44cf8c41df8b0f2f8134f28fd0edbac19d4dcf6c3cfffe06c12a21aacab
|
|
@@ -206,15 +206,15 @@ module Effective
|
|
|
206
206
|
self.resource ||= resource_scope.new
|
|
207
207
|
|
|
208
208
|
@page_title ||= "New #{resource_name.titleize}"
|
|
209
|
-
|
|
210
209
|
action = commit_action[:action]
|
|
211
|
-
EffectiveResources.authorize!(self, action, resource) unless action == :save
|
|
212
|
-
EffectiveResources.authorize!(self, :create, resource) if action == :save
|
|
213
210
|
|
|
211
|
+
resource.assign_attributes(send(resource_params_method_name))
|
|
214
212
|
resource.created_by ||= current_user if resource.respond_to?(:created_by=)
|
|
215
213
|
|
|
214
|
+
EffectiveResources.authorize!(self, (action == :save ? :create : action), resource)
|
|
215
|
+
|
|
216
216
|
respond_to do |format|
|
|
217
|
-
if save_resource(resource, action
|
|
217
|
+
if save_resource(resource, action)
|
|
218
218
|
request.format = :html if specific_redirect_path?
|
|
219
219
|
|
|
220
220
|
format.html do
|
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: 0.9.
|
|
4
|
+
version: 0.9.4
|
|
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: 2018-08-
|
|
11
|
+
date: 2018-08-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|