effective_resources 1.4.0 → 1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f1c06db29b4f36ce235cbbc88f563a2f88061b140b4dd431c37e3e055c2a5f7
|
4
|
+
data.tar.gz: 89b4a38744dc72283e00067ac8e6e0e027ea1c22a3b4214ef0eb687b5dd8e4d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb1fe32288633b8b0f2e6ff290769709e72b7c2d77d1eca1267e9b776313fc5d1d76148774d313eb373eacca2d6127496afa8d5156c80df0058a8e9fea7a429f
|
7
|
+
data.tar.gz: f82e995fe3dc57d86be8e2a6328deece5c702ee9471616c3b1857df87f87dabcede3fb80837af22529f14b9aaf6e75cd1722885c5129a9ee88ff6df9d5c7e310
|
@@ -35,7 +35,10 @@ module Effective
|
|
35
35
|
EffectiveResources.authorize!(self, :show, duplicate)
|
36
36
|
|
37
37
|
self.resource = duplicate_resource(duplicate)
|
38
|
-
|
38
|
+
|
39
|
+
unless resource.kind_of?(resource_scope.klass) && resource.new_record?
|
40
|
+
raise "expected duplicate_resource to return an unsaved new #{resource_scope.klass} resource"
|
41
|
+
end
|
39
42
|
|
40
43
|
if (message = flash[:success].to_s).present?
|
41
44
|
flash.delete(:success)
|
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.1
|
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-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|