diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a1ff6ad..2d3dcb0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -33,7 +33,7 @@ if FastGettext.default_available_locales.include?(params[:locale]) session[:locale] = params[:locale] end - redirect_to root_path + redirect_to(request.referer || root_path) #redirects the user to URL where she/he was when the request to this resource was made or root if none is encountered end def store_location