draper-cancancan 1.0.1 → 1.1.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
  SHA1:
3
- metadata.gz: 8a9714242ff18d2170d83833f7af4de8620ab24b
4
- data.tar.gz: 60d44e4aa8b88a973c0d198d242c3082834eaabc
3
+ metadata.gz: f6433944ecaaf9eb090c96d61ba46232cd6fa517
4
+ data.tar.gz: ff69add0fa792bcecb826d9b8413f37caa64303e
5
5
  SHA512:
6
- metadata.gz: f6729f3e33dcff5bc15484abfaebda21e0da3c334d2bce128371cca994c70a5f647df7875c9666b878b852b42d661d89afc68a20f20cedb8c4ab943ff90894e6
7
- data.tar.gz: 559184c0c43b622c87733a1a7bc20eaa86ab01db1d67433925401d568c1666c073ef6de805ac45c1f2ce6cc6d48873f60e3669b73a173cac669640a118a199c5
6
+ metadata.gz: d03c74ec5041575e76c2e44cd4c7450fd08676ee51001f319091dba6f67c15e73cc2647c366aadf6b5f028ed461b32841927c5d69bda6efbcd769fb837b77901
7
+ data.tar.gz: 44aa05e860c14bb90ba2cbf4a7e76a1864041c98c12e55c12e4a0cf82d5f1fa8d4e640c460c4ba64fc04b8ec5126b1b916d94817c15b9e9451be6b4a85f571e4
@@ -2,13 +2,13 @@ require "draper/cancancan/version"
2
2
 
3
3
  module Draper
4
4
  module CanCanCan
5
- # actually don't need any code in my gem's namespace ..
5
+ # actually don't need any code in my gem's namespace ..
6
6
  def can?(action, subject, *extra_args)
7
- if subject.is_a?(Draper::Decorator)
8
- super(action,subject.model,*extra_args)
9
- else
10
- super(action,subject,*extra_args)
7
+ while subject.is_a?(Draper::Decorator)
8
+ subject = subject.model
11
9
  end
10
+
11
+ super(action, subject, *extra_args)
12
12
  end
13
13
 
14
14
  def cannot?(*args)
@@ -1,5 +1,5 @@
1
1
  module Draper
2
2
  module CanCanCan
3
- VERSION = "1.0.1"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: draper-cancancan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mathews
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2016-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler