mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-05 07:01:03 -05:00
Reduce complexity of ApplicationController.store_location
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user