Module: Spree::UserLastUrlStorer::Rules::AuthenticationRule

Extended by:
AuthenticationRule
Included in:
AuthenticationRule
Defined in:
app/models/spree/user_last_url_storer/rules/authentication_rule.rb

Overview

This is the basic rule that ships with Solidus that avoids storing in session the current path for login/logout/signup routes, avoiding possibly infinte redirects.

Constant Summary collapse

AUTHENTICATION_ROUTES =
%w[spree_signup_path spree_login_path spree_logout_path]

Instance Method Summary collapse

Instance Method Details

#match?(controller) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
# File 'app/models/spree/user_last_url_storer/rules/authentication_rule.rb', line 14

def match?(controller)
  full_path = controller.request.fullpath
  disallowed_urls(controller).include?(full_path)
end