newellista-searchlogic 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/searchlogic/rails_helpers.rb +8 -4
- data/searchlogic.gemspec +1 -1
- metadata +1 -1
data/VERSION.yml
CHANGED
@@ -20,10 +20,14 @@ module Searchlogic
|
|
20
20
|
options[:ascend_scope] ||= "ascend_by_#{options[:by]}"
|
21
21
|
options[:descend_scope] ||= "descend_by_#{options[:by]}"
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
if options[:tri_state].to_s == "true"
|
24
|
+
new_scope = "" if search.order.empty?
|
25
|
+
new_scope = options[ :descend_scope ] if search.order.to_s == options[ :ascend_scope ]
|
26
|
+
new_scope ||= options[ :ascend_scope ]
|
27
|
+
else
|
28
|
+
ascending = search.order.to_s == options[:ascend_scope]
|
29
|
+
new_scope = ascending ? options[:descend_scope] : options[:ascend_scope]
|
30
|
+
end
|
27
31
|
|
28
32
|
selected = [options[:ascend_scope], options[:descend_scope]].include?(search.order.to_s)
|
29
33
|
if selected
|
data/searchlogic.gemspec
CHANGED