app/helpers/blacklight/url_helper_behavior.rb in blacklight-5.10.2 vs app/helpers/blacklight/url_helper_behavior.rb in blacklight-5.10.3
- old
+ new
@@ -80,13 +80,18 @@
def session_tracking_params document, counter
if document.nil?
return {}
end
- { :data => {:'context-href' => track_solr_document_path(document, per_page: params.fetch(:per_page, search_session['per_page']), counter: counter, search_id: current_search_session.try(:id))}}
+ { :data => {:'context-href' => session_tracking_path(document, per_page: params.fetch(:per_page, search_session['per_page']), counter: counter, search_id: current_search_session.try(:id))}}
end
protected :session_tracking_params
+ ##
+ # Get the URL for tracking search sessions across pages using polymorphic routing
+ def session_tracking_path document, params = {}
+ polymorphic_path([:track, document], params)
+ end
#
# link based helpers ->
#