Initial commit - fresh start

This commit is contained in:
Ubuntu
2025-10-27 04:04:54 +00:00
parent a659275fb6
commit 52ab5d1005
265 changed files with 188424 additions and 64 deletions

View File

@@ -0,0 +1,50 @@
module Spree
module AuthenticationHelpers
def self.included(receiver)
receiver.helper_method(
:spree_current_user,
:spree_login_path,
:spree_signup_path,
:spree_logout_path,
:spree_forgot_password_path,
:spree_edit_password_path,
:spree_admin_login_path,
:spree_admin_logout_path
)
end
def spree_current_user
send("current_#{Spree.user_class.model_name.singular_route_key}")
end
def spree_login_path(opts = {})
new_session_path(Spree.user_class.model_name.singular_route_key, opts)
end
def spree_signup_path(opts = {})
new_registration_path(Spree.user_class.model_name.singular_route_key, opts)
end
def spree_logout_path(opts = {})
destroy_session_path(Spree.user_class.model_name.singular_route_key, opts)
end
def spree_forgot_password_path(opts = {})
new_password_path(Spree.user_class.model_name.singular_route_key, opts)
end
def spree_edit_password_path(opts = {})
edit_registration_path(Spree.user_class.model_name.singular_route_key, opts)
end
def spree_admin_login_path(opts = {})
new_admin_user_session_path(opts)
end
def spree_admin_logout_path(opts = {})
destroy_admin_user_session_path(opts)
end
end
end
ApplicationController.include Spree::AuthenticationHelpers if defined?(ApplicationController)