remove cable ready from application controller and refactor shared/alert to resend email confirmation with turbo_stream

This commit is contained in:
wandji20
2024-10-13 01:22:11 +01:00
parent 7038aff5b8
commit 630fb849fa
3 changed files with 2 additions and 17 deletions

View File

@@ -9,7 +9,6 @@ require 'spree/core/controller_helpers/common'
require 'open_food_network/referer_parser'
class ApplicationController < ActionController::Base
include CablecarResponses
include Pagy::Backend
include RequestTimeouts

View File

@@ -1,15 +0,0 @@
# frozen_string_literal: true
module CablecarResponses
extend ActiveSupport::Concern
included do
include CableReady::Broadcaster
end
private
def partial(path, options = {})
{ html: render_to_string(partial: path, **options) }
end
end

View File

@@ -1,5 +1,6 @@
.alert-box{ class: "#{type}" }
= message
- if local_assigns[:unconfirmed]
%a{ "data-action": "login-modal#resend_confirmation", "data-tab": local_assigns[:tab] }
- params = { spree_user: { email: email }, tab: local_assigns[:tab] }
= link_to spree_user_confirmation_path(params), params:, data: { turbo_method: :post } do
= t('devise.confirmations.resend_confirmation_email')