Welcome to mirror list, hosted at ThFree Co, Russian Federation.

filters_events.rb « concerns « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c82d0318fd3e5774db1b3646c5cc2275601f6463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module FiltersEvents
  def event_filter
    @event_filter ||= new_event_filter.tap { |ef| cookies[:event_filter] = ef.filter }
  end

  private

  def new_event_filter
    active_filter = params[:event_filter].presence || cookies[:event_filter]
    EventFilter.new(active_filter)
  end
end