roles_generic 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/lib/roles_generic/base.rb
CHANGED
@@ -13,6 +13,12 @@ module Roles::Generic
|
|
13
13
|
attr_accessor(*::Roles::Generic::User::INHERITABLE_CLASS_ATTRIBUTES)
|
14
14
|
|
15
15
|
def apply_options options = {}
|
16
|
+
if options.kind_of?(Hash) && options[:attribute]
|
17
|
+
roles_attribute options[:attribute]
|
18
|
+
return
|
19
|
+
end
|
20
|
+
|
21
|
+
puts "default: #{default_options? options}, att: #{default_role_attribute}"
|
16
22
|
roles_attribute default_role_attribute if default_options? options
|
17
23
|
end
|
18
24
|
|
@@ -21,7 +27,7 @@ module Roles::Generic
|
|
21
27
|
def default_options? options
|
22
28
|
return true if options == :default
|
23
29
|
if options.kind_of? Hash
|
24
|
-
return true if options[:config] == :default || options == {}
|
30
|
+
return true # if options[:config] == :default || options == {}
|
25
31
|
end
|
26
32
|
false
|
27
33
|
end
|
@@ -50,7 +50,7 @@ module Roles
|
|
50
50
|
def default_options? options = {}
|
51
51
|
return true if options == :default
|
52
52
|
if options.kind_of? Hash
|
53
|
-
return true if options[:config] == :default || options == {}
|
53
|
+
return true # if options[:config] == :default || options == {}
|
54
54
|
end
|
55
55
|
false
|
56
56
|
end
|
data/roles_generic.gemspec
CHANGED