Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghetticode committed Nov 8, 2019
1 parent 3d05489 commit 71d13fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 1 addition & 9 deletions core/app/models/spree/user_last_url_storer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ module Spree
# into `session[:spree_user_return_to]` for redirects after successful
# user/admin authentication.
class UserLastUrlStorer
class Configuration
def rules
@rules ||= ::Spree::Core::ClassConstantizer::Set.new.tap do |set|
set << 'Spree::UserLastUrlStorer::Rules::AuthenticationRule'
end
end
end

# Lists all the rules that will be evaluated before storing the
# current path value into the session.
#
Expand All @@ -27,7 +19,7 @@ def rules
# Spree::UserLastUrlStorer.rules.delete('CustomRule')
#
def self.rules
Spree::Config.user_last_url_storer.rules
Spree::Config.user_last_url_storer_rules
end

# @param controller [ApplicationController] an instance of ApplicationController
Expand Down
6 changes: 4 additions & 2 deletions core/lib/spree/app_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,10 @@ def events
@events_configuration ||= Spree::Event::Configuration.new
end

def user_last_url_storer
@user_last_url_storer_configuration ||= Spree::UserLastUrlStorer::Configuration.new
def user_last_url_storer_rules
@user_last_url_storer_rules ||= ::Spree::Core::ClassConstantizer::Set.new.tap do |set|
set << 'Spree::UserLastUrlStorer::Rules::AuthenticationRule'
end
end

def environment
Expand Down

0 comments on commit 71d13fb

Please sign in to comment.