diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 468f767c6..3b76c87b8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,13 +7,12 @@ class ApplicationController < ActionController::Base before_action :set_locale def store_location - if (request.path != "/members/sign_in" && - request.path != "/members/sign_up" && - request.path != "/members/password/new" && - request.path != "/members/password/edit" && - request.path != "/members/confirmation" && - request.path != "/members/sign_out" && - !request.xhr?) + unless (request.path.in?(["/members/sign_in", + "/members/sign_up", + "/members/password/new", + "/members/password/edit", + "/members/confirmation", + "/members/sign_out"]) || request.xhr?) store_location_for(:member, request.fullpath) end end