Module: BlacklightCql::TemplateHelperExtension
- Defined in:
- lib/blacklight_cql/template_helper_extension.rb
Overview
We can over-ride a default Blacklight template helper and still call super on it, by inserting this module as a helper into CatalogController. This plugins setup will do that.
Instance Method Summary collapse
-
#search_fields ⇒ Object
Make sure the CQL pseudo-search_field is included in the ‘select’ when we’re displaying a CQL search, so the select makes sense.
Instance Method Details
#search_fields ⇒ Object
Make sure the CQL pseudo-search_field is included in the ‘select’ when we’re displaying a CQL search, so the select makes sense.
8 9 10 11 12 13 14 15 16 |
# File 'lib/blacklight_cql/template_helper_extension.rb', line 8 def search_fields field = BlacklightCql::SolrHelperExtension.pseudo_search_field if params[:q].blank? || params[:search_field] != field[:key] super else super.clone.push([field[:label], field[:key]]).uniq end end |