Allow events filter to be set in the URL in addition to cookie
This commit is contained in:
parent
4586d77c85
commit
65cf805278
|
@ -275,6 +275,7 @@ class ApplicationController < ActionController::Base
|
||||||
def event_filter
|
def event_filter
|
||||||
# Split using comma to maintain backward compatibility Ex/ "filter1,filter2"
|
# Split using comma to maintain backward compatibility Ex/ "filter1,filter2"
|
||||||
filters = cookies['event_filter'].split(',')[0] if cookies['event_filter'].present?
|
filters = cookies['event_filter'].split(',')[0] if cookies['event_filter'].present?
|
||||||
|
filters = params[:event_filter].split(',')[0] if params[:event_filter].present?
|
||||||
@event_filter ||= EventFilter.new(filters)
|
@event_filter ||= EventFilter.new(filters)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "Allow events filter to be set in the URL in addition to cookie"
|
||||||
|
merge_request: 21557
|
||||||
|
author: Igor @igas
|
||||||
|
type: added
|
Loading…
Reference in New Issue