Class: BlacklightRangeLimit::FacetItemPresenter
- Inherits:
-
Blacklight::FacetItemPresenter
- Object
- Blacklight::FacetItemPresenter
- BlacklightRangeLimit::FacetItemPresenter
- Defined in:
- app/presenters/blacklight_range_limit/facet_item_presenter.rb
Overview
Override the default item presenter to provide custom labels for range data.
Instance Method Summary collapse
-
#href(path_options = {}) ⇒ Object
Very hacky way to keep params used for ajax query for segments out of our generated facet links.
- #label ⇒ Object
Instance Method Details
#href(path_options = {}) ⇒ Object
Very hacky way to keep params used for ajax query for segments out of our generated facet links. Sorry this seems to be the best way!
github.com/projectblacklight/blacklight_range_limit/issues/296
15 16 17 18 |
# File 'app/presenters/blacklight_range_limit/facet_item_presenter.rb', line 15 def href( = {}) override_to_nil = BlacklightRangeLimit::ControllerOverride::RANGE_LIMIT_FIELDS.collect { |f| [f, nil] }.to_h super(.merge(override_to_nil)) end |
#label ⇒ Object
7 8 9 |
# File 'app/presenters/blacklight_range_limit/facet_item_presenter.rb', line 7 def label label_for_range || super end |