Class: Sunspot::DSL::Fields
- Inherits:
-
Object
- Object
- Sunspot::DSL::Fields
- Defined in:
- lib/sunspot_plus/dsl/fields.rb
Instance Method Summary collapse
-
#sort_fields(*names, &block) ⇒ Object
NOTE : I want to call case_insensitive_sort using method missing but with adjusted name Could use adjust_solr_params but not sure about this method.
Instance Method Details
#sort_fields(*names, &block) ⇒ Object
NOTE : I want to call case_insensitive_sort using method missing but with adjusted name Could use adjust_solr_params but not sure about this method.
6 7 8 9 10 11 12 |
# File 'lib/sunspot_plus/dsl/fields.rb', line 6 def sort_fields(*names, &block) = names.last.is_a?(Hash) ? names.pop : {} names.each do |name| = {:using => name}.update() case_insensitive_sort( Sunspot::Type::CaseInsensitiveSortType.instance.field_name(name), , &block) end end |