Method: Blacklight::FacetGroupedItemPresenter#add_href

Defined in:
app/presenters/blacklight/facet_grouped_item_presenter.rb

#add_href(_path_options = {}) ⇒ Object



30
31
32
33
34
35
36
37
38
39
# File 'app/presenters/blacklight/facet_grouped_item_presenter.rb', line 30

def add_href(_path_options = {})
  if facet_config.url_method
    return view_context.public_send(facet_config.url_method, facet_config.key, facet_item)
  end

  new_state = search_state.filter(facet_config).remove(@group)
  new_state = new_state.filter(facet_config).add(@group + [facet_item])

  view_context.search_action_path(new_state)
end