active_permission 0.2.2 → 0.2.3

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: f7884c2a9df82a44420cf0cae72f544f8cfbe198
4
- data.tar.gz: be5626d3cb6929fdb3b1331e0e6128f7c3a65aa4
3
+ metadata.gz: 0e565691f66176dcb3aea2eb1f3ad374efb16c08
4
+ data.tar.gz: ee789b4e507ab81ff21bf0551c0cbbb67779bee3
5
5
  SHA512:
6
- metadata.gz: 741dc75811de73cb9115300c8ca614497df861354a35dc4774dbf6d381f5ea21ed4ba1e3ed23a7333280480f5637e30e29829d198e5ea95cc2aa2a5a326f8e16
7
- data.tar.gz: 4d26ab693249a1af351c17083d91e26decbb5ce75e1fd9c4c187c84d115ebe9354b04b3b108d1119bcb4d55cb921093cbe406702f40c24c11b7fe16428b880ba
6
+ metadata.gz: 269ac5d9e8193775f371110cda4785d462bd220942d6c33691af38cb200a87b824920417d4dab5734b133e892083f578926061c5a2b4eba64f6e64c98e68f8dc
7
+ data.tar.gz: 84d50bfa495b78f1a8a2edf6183c9beb794527d00511b99a5c63dfbd658e2bf220f1f35d786a9392088eeb72566273f58adf7a307a1d2e33c40a450211aec0d6
@@ -12,7 +12,7 @@ module ActivePermission
12
12
  @resources = resources
13
13
  message = "Access denied in #{@controller}::#{@action}"
14
14
  if resources
15
- message += ' on resources ' + resources.collect{|resource| resource.respond_to?(:id) ? "#{resource.class}(#{resource.id})}" : resource}.to_s
15
+ message += ' on resources ' + resources.collect{|resource| resource.respond_to?(:id) ? "#{resource.class}(#{resource.id})" : resource}.to_s
16
16
  end
17
17
  super(message)
18
18
  end
@@ -34,7 +34,7 @@ module ActivePermission
34
34
  end
35
35
  def can?(controllers, actions, *resource)
36
36
  can!(controllers, actions, *resource)
37
- rescue
37
+ rescue AccessDenied
38
38
  false
39
39
  end
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module ActivePermission
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_permission
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Shurmin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-20 00:00:00.000000000 Z
11
+ date: 2018-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.4.5.1
108
+ rubygems_version: 2.6.14
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: This gem allow you load and authorize resource in Ruby on Rails inside controllers