role_authorization 0.3.9 → 0.4.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.
@@ -20,10 +20,14 @@ module RoleAuthorization
20
20
  end
21
21
 
22
22
  def users(scope = nil)
23
- if scope.nil?
24
- RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids.values.flatten.uniq).all
23
+ if user_ids.blank?
24
+ []
25
25
  else
26
- RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids[scope_with(scope)]).all
26
+ if scope.nil?
27
+ RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids.values.flatten.uniq).all
28
+ else
29
+ RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids[scope_with(scope)]).all
30
+ end
27
31
  end
28
32
  end
29
33
 
@@ -1,3 +1,3 @@
1
1
  module RoleAuthorization
2
- VERSION = "0.3.9"
2
+ VERSION = "0.4.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.3.9
5
+ version: 0.4.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - John 'asceth' Long