diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9c77fe48..9a5de547 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base helper_method :available_locales protect_from_forgery - before_filter :select_foodcoop, :authenticate, :store_controller, :items_per_page, :set_redirect_to + before_filter :select_foodcoop, :authenticate, :store_controller, :items_per_page after_filter :remove_controller @@ -128,18 +128,6 @@ class ApplicationController < ActionController::Base end end - def set_redirect_to - session[:redirect_to] = params[:redirect_to] if params[:redirect_to] - end - - def back_or_default_path(default = root_path) - if session[:redirect_to].present? - default = session[:redirect_to] - session[:redirect_to] = nil - end - default - end - # Always stay in foodcoop url scope def default_url_options(options = {}) {foodcoop: FoodsoftConfig.scope} diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index f301156a..440db16a 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -14,7 +14,7 @@ class InvitesController < ApplicationController respond_to do |format| format.html do - redirect_to back_or_default_path, notice: I18n.t('invites.success') + redirect_to root_path, notice: I18n.t('invites.success') end format.js { render layout: false } end