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: 7bc0eccebb63340529589c9022a9ae3ae65858156b314bf3d1a3ba96e0607d4d
4
- data.tar.gz: 4360fe550745e1425729a79c47d76947ca27f998b5a04e57d175c40c7b853fa2
3
+ metadata.gz: 4f1c06db29b4f36ce235cbbc88f563a2f88061b140b4dd431c37e3e055c2a5f7
4
+ data.tar.gz: 89b4a38744dc72283e00067ac8e6e0e027ea1c22a3b4214ef0eb687b5dd8e4d0
5
5
  SHA512:
6
- metadata.gz: dddd805e8326609bb9d204f1af2effac22e913f45aacfa1a0ee2503be6c7798a02d7a279112287bc091c77fcb7db43cf9313c29896650cabd525cd96cf95648f
7
- data.tar.gz: feaf7e3c58ea57080823fa714927d9e71c0c2929bb3027d012b1511c859ec69ff4c021d59435ea54fa5d6e0d6ebde05e5cbe5e194c769446f667abf6f16864dd
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
- raise "expected duplicate_resource to return an unsaved new #{resource_klass} resource" unless resource.kind_of?(resource_klass) && resource.new_record?
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)
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.4.1'.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.0
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-10-31 00:00:00.000000000 Z
11
+ date: 2019-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails