mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Strips set prefix from method in ProducerMailer
This commit is contained in:
@@ -221,10 +221,9 @@ Metrics/PerceivedComplexity:
|
||||
- 'app/models/spree/ability.rb'
|
||||
- 'app/models/spree/order/checkout.rb'
|
||||
|
||||
# Offense count: 7
|
||||
# Offense count: 6
|
||||
Naming/AccessorMethodName:
|
||||
Exclude:
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/models/spree/order.rb'
|
||||
- 'app/services/checkout/post_checkout_actions.rb'
|
||||
- 'lib/spree/core/controller_helpers/common.rb'
|
||||
|
||||
@@ -37,7 +37,7 @@ class ProducerMailer < ApplicationMailer
|
||||
@receival_instructions = @order_cycle.receival_instructions_for(@producer)
|
||||
@total = total_from_line_items(line_items)
|
||||
@tax_total = tax_total_from_line_items(line_items)
|
||||
@customer_line_items = set_customer_data(line_items)
|
||||
@customer_line_items = customer_data(line_items)
|
||||
end
|
||||
|
||||
def subject
|
||||
@@ -76,7 +76,7 @@ class ProducerMailer < ApplicationMailer
|
||||
Spree::Money.new line_items.to_a.sum(&:included_tax)
|
||||
end
|
||||
|
||||
def set_customer_data(line_items)
|
||||
def customer_data(line_items)
|
||||
return unless @coordinator.show_customer_names_to_suppliers?
|
||||
|
||||
@display_business_name = false
|
||||
|
||||
Reference in New Issue
Block a user