darkhelmet-role_on 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/role_on.rb +2 -2
  3. data/role_on.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
data/lib/role_on.rb CHANGED
@@ -33,8 +33,8 @@ module RoleOn
33
33
 
34
34
  module RoleOnUserClassMethods
35
35
  def helper_for(role,name = role.to_s.pluralize)
36
- named_scope(name, lambda { { :conditions => ['role_id = ?', Role[role].id], :joins => :roles } })
37
- named_scope("non_#{name}", lambda { { :conditions => [ 'roles.id is ? or roles.id != ?', nil, Role[role].id ], :joins => :roles } })
36
+ named_scope(name, lambda { { :conditions => ['roles.id = ?', Role[role].id], :joins => :roles } })
37
+ named_scope("non_#{name}", lambda { { :conditions => [ 'roles.id is ? or roles.id != ?', nil, Role[role].id ], :include => :roles } })
38
38
  end
39
39
  end
40
40
 
data/role_on.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{role_on}
5
- s.version = "0.2.4"
5
+ s.version = "0.2.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Daniel Huckstep"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darkhelmet-role_on
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Huckstep