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 |
# File 'lib/sunspot_plus/dsl/fields.rb', line 6 def sort_fields(*names, &block) = names.pop if names.last.is_a?(Hash) names.each{|name| case_insensitive_sort(Sunspot::Type::CaseInsensitiveSortType.instance.field_name(name), {:as => name}, &block)} end |