Module: CurationConcerns::RenderConstraintsHelper
- Included in:
- MainAppHelpers
- Defined in:
- app/helpers/curation_concerns/render_constraints_helper.rb
Instance Method Summary collapse
-
#fields_to_exclude_from_constraint_element ⇒ Array<Symbol>
You can override this if you have different fields to remove.
-
#remove_constraint_url(localized_params) ⇒ Object
This overrides Blacklight to remove the ‘search_field’ tag from the localized params when the query is cleared.
Instance Method Details
#fields_to_exclude_from_constraint_element ⇒ Array<Symbol>
You can override this if you have different fields to remove
17 18 19 |
# File 'app/helpers/curation_concerns/render_constraints_helper.rb', line 17 def fields_to_exclude_from_constraint_element [:search_field] end |
#remove_constraint_url(localized_params) ⇒ Object
This overrides Blacklight to remove the ‘search_field’ tag from the localized params when the query is cleared. This is because unlike Blacklight, there is no control to change the search_field in the curation_concerns UI
7 8 9 10 11 12 13 |
# File 'app/helpers/curation_concerns/render_constraints_helper.rb', line 7 def remove_constraint_url(localized_params) scope = localized_params.delete(:route_set) || self = localized_params.merge(q: nil, action: 'index') .except(*fields_to_exclude_from_constraint_element) .permit! scope.url_for() end |