Quick correction, filter region stored in session was not used...

This commit is contained in:
echarp 2017-09-17 18:41:05 +02:00
parent 5a672589bc
commit 950728ae50

View File

@ -12,9 +12,12 @@ class ApplicationController < ActionController::Base
http_accept_language.compatible_language_from I18n.available_locales http_accept_language.compatible_language_from I18n.available_locales
end end
# Mechanism to manage the region filter
def set_filters def set_filters
return unless params.include? :region if params.include? :region
session[:region] = params[:region] == 'all' ? nil : params[:region].to_i session[:region] = params[:region] == 'all' ? nil : params[:region].to_i
end
params[:region] ||= session[:region]
end end
protected protected