destiny-rails 0.0.5 → 0.0.6

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: 945bf7a270ea5a075b30ba21949fe542974a1a95
4
- data.tar.gz: c7ea37a9d9c3834f2667284aa510e8a161e57629
3
+ metadata.gz: adf08961b28b27cde570f028904c5b179dec3b38
4
+ data.tar.gz: efc9bbba37033127fd06c35917614277c6866d6c
5
5
  SHA512:
6
- metadata.gz: 0c884430013abaf6d27c4599194b33a58a66f291c46c0a4253391edc757fac58ea0953fc21b1bbb97a9a56af9ce9a386b7a87e23b4f5793365e582b7aeff709c
7
- data.tar.gz: d9f256f154997e83d98ae22be1b59a5d70a76d110cadf196a2ab5cbff003dc3c4b8fc1299a81709a0451b91e268932f4e04eb5c46320b2997a49e49f32716971
6
+ metadata.gz: d3948ca3b206147d7b394968cf18ebc1043ca5af5df54a0e4e03da3e23f62c3f0ad269229ae5c1176d09e371b6f01689a6f228966494b3b0e2dd80f123a5ba59
7
+ data.tar.gz: 6d5176f735c4a330fb05ce301c00387c64c78d0b05b30d54b2a5cb435e249bee20b2db396b5ad377a57e6dd5645ad709f28c6919e36468a1fa63f92e0246beea
@@ -4,6 +4,12 @@ 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
7
13
  end
8
14
 
9
15
  def has_grant?(section_name, grant_name)
@@ -32,13 +38,5 @@ module Destiny
32
38
  alias_method :admin?, :is_admin?
33
39
  alias_method :has_role?, :has_grant?
34
40
 
35
- module ClassMethods
36
-
37
- def with_role(role_name)
38
- Role.find_by_name(role_name).users
39
- end
40
-
41
- end
42
-
43
41
  end
44
42
  end
@@ -1,3 +1,3 @@
1
1
  module Destiny
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Zhukov