mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-14 23:47:48 +00:00
remove cable ready from application controller and refactor shared/alert to resend email confirmation with turbo_stream
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user