role_authorization 0.2.8 → 0.3.0

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.
@@ -21,9 +21,9 @@ module RoleAuthorization
21
21
 
22
22
  def users(scope = nil)
23
23
  if user_ids.is_a?(Hash)
24
- RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids[scope_with(scope)])
24
+ RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids[scope_with(scope)]).all
25
25
  else
26
- RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids)
26
+ RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids).all
27
27
  end
28
28
  end
29
29
 
@@ -9,7 +9,7 @@ module RoleAuthorization
9
9
  end
10
10
 
11
11
  def users(scope = nil)
12
- klass.find_all_by_name(roles).map {|role| role.users(scope) }
12
+ klass.find_all_by_name(roles).map {|role| role.users(scope) }.flatten
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module RoleAuthorization
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: role_authorization
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.8
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - John 'asceth' Long