devise_roles 0.1.4 → 0.1.5

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: 1e4d5dc808ce9ccbbe752e050002b3de64f31ca1
4
- data.tar.gz: 895f319980456bb8d52b9828e34c17efa3228603
3
+ metadata.gz: db0b201084508aebd42a97bc67f82543737582b9
4
+ data.tar.gz: b3fadeafe9c4f9d29454090a30fc7d6f02201344
5
5
  SHA512:
6
- metadata.gz: da464d788b962cf42149a82faf886036fa04c796137181643a84bd37244433febd0ebadaf0828c3a4dab33bd1875ac7276a3aeeaf5e441c0e5dddc6afe3f37e0
7
- data.tar.gz: 5f2aa3635e7bea9864591b7097327516ef32066a005dc65e9b6c23872767b62d3a5750ea011deb4b7b247c8ce4fcee4b32db2e10b16fd3b805c39d62f1ed25c7
6
+ metadata.gz: ec53d7a365cb5bc6828337aaf0da68caf5b329aca3c73f29c94f171066bd0239c359594ba328718706523ecb01b31ba4b83d34f9ca414f4ece55d9c082bc880c
7
+ data.tar.gz: 787cb4e4694c4bce4c3ed6009d6c0c2eff6b0bb642be70421484bfa109302b8f38dedb87e37d9ed3affa06efba2429194b2b2df64cfa60d83fbf9dc3d35f00c4
Binary file
@@ -1,3 +1,3 @@
1
1
  module DeviseRoles
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/devise_roles.rb CHANGED
@@ -2,7 +2,7 @@ require "devise_roles/version"
2
2
 
3
3
  module DeviseRoles
4
4
  def self.available_for_user_role(user_role_name, user_redirect_path)
5
- if current_user.role.name != user_role_name
5
+ if @current_user.role.name != user_role_name
6
6
  redirect_to admin_path, alert: "You should be #{user_role_name} to view that page!"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_roles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - MarkusBansky
@@ -73,6 +73,7 @@ files:
73
73
  - devise_roles-0.1.1.gem
74
74
  - devise_roles-0.1.2.gem
75
75
  - devise_roles-0.1.3.gem
76
+ - devise_roles-0.1.4.gem
76
77
  - devise_roles.gemspec
77
78
  - lib/devise_roles.rb
78
79
  - lib/devise_roles/version.rb