Quick correction, filter region stored in session was not used...
This commit is contained in:
parent
5a672589bc
commit
950728ae50
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user