destiny-rails 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adf08961b28b27cde570f028904c5b179dec3b38
4
- data.tar.gz: efc9bbba37033127fd06c35917614277c6866d6c
3
+ metadata.gz: 04231ff4d6f73a9fae8800fd7a06d04d2754b827
4
+ data.tar.gz: e2aeb5b1033a5d48049be47bcc9456e3fb948c24
5
5
  SHA512:
6
- metadata.gz: d3948ca3b206147d7b394968cf18ebc1043ca5af5df54a0e4e03da3e23f62c3f0ad269229ae5c1176d09e371b6f01689a6f228966494b3b0e2dd80f123a5ba59
7
- data.tar.gz: 6d5176f735c4a330fb05ce301c00387c64c78d0b05b30d54b2a5cb435e249bee20b2db396b5ad377a57e6dd5645ad709f28c6919e36468a1fa63f92e0246beea
6
+ metadata.gz: 9f00c73378842955228fd40629a23cf9faf848783a3dd9cd49408f3c7b87e985aeedc9a9066009cdbcdb712d5f5667cf0359768019bb92d9b76f0e14159031d8
7
+ data.tar.gz: 891ebe8f87db81670724bc6d9710f0582dcdd39e922c00e3adf51bfb81d378181fc1792ae90f64e5ad8bdd1b841b3c97c46f239475bd592a322895af152708c9
@@ -4,12 +4,6 @@ module Destiny
4
4
 
5
5
  included do
6
6
  has_and_belongs_to_many :roles, join_table: :users_roles
7
-
8
- module ClassMethods
9
- def with_role(role_name)
10
- Role.find_by_name(role_name).users
11
- end
12
- end
13
7
  end
14
8
 
15
9
  def has_grant?(section_name, grant_name)
@@ -38,5 +32,11 @@ module Destiny
38
32
  alias_method :admin?, :is_admin?
39
33
  alias_method :has_role?, :has_grant?
40
34
 
35
+ module ClassMethods
36
+ def with_role(role_name)
37
+ ::Role.find_by_name(role_name).users
38
+ end
39
+ end
40
+
41
41
  end
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module Destiny
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: destiny-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Zhukov