mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Move strip_html to main app, fixes context-sensitive chili feature spec fail
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module FeatureHelper
|
||||
module HtmlHelper
|
||||
def strip_html(html)
|
||||
strip_tags(html).gsub(/ /i, ' ').gsub(/&/i, '&')
|
||||
end
|
||||
3
app/mailers/spree/order_mailer_decorator.rb
Normal file
3
app/mailers/spree/order_mailer_decorator.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
Spree::OrderMailer.class_eval do
|
||||
helper HtmlHelper
|
||||
end
|
||||
@@ -7,8 +7,6 @@ module EnterprisesDistributorInfoRichTextFeature
|
||||
initializer 'enterprises_distributor_info_rich_text_feature.mailer', :after => :load_config_initializers do |app|
|
||||
if OpenFoodWeb::FeatureToggle.enabled? :enterprises_distributor_info_rich_text
|
||||
::Spree::OrderMailer.class_eval do
|
||||
helper FeatureHelper
|
||||
|
||||
def confirm_email(order, resend = false)
|
||||
@order = order
|
||||
subject = (resend ? "[#{t(:resend).upcase}] " : '')
|
||||
|
||||
Reference in New Issue
Block a user