has_sunspot_scope 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. data/lib/has_scope.rb +8 -8
  2. metadata +3 -3
@@ -86,19 +86,19 @@ module HasScope
86
86
  self.scopes_configuration[scope].merge!(options)
87
87
  end
88
88
  end
89
- end
90
89
 
91
- def define_scope_helper_methods
92
- scopes_configuration.keys.each do |scope|
93
- instance_eval do
94
- define_method "#{scope.to_s.singularize}_scope?" do
95
- current_scopes.has_key?(scope.to_sym)
90
+ def define_scope_helper_methods
91
+ scopes_configuration.keys.each do |scope|
92
+ instance_eval do
93
+ define_method "#{scope.to_s.singularize}_scope?" do
94
+ current_scopes.has_key?(scope.to_sym)
95
+ end
96
96
  end
97
97
  end
98
+ helper_method *scopes_configuration.keys.map {|scope| "#{scope.to_s.singularize}_scope?" }
98
99
  end
99
- helper_method *scopes_configuration.keys.map {|scope| "#{scope.to_s.singularize}_scope?" }
100
- end
101
100
 
101
+ end
102
102
  protected
103
103
 
104
104
  # Receives an object where scopes will be applied to.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_sunspot_scope
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jos\xC3\xA9 Valim"