mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Remove nokigiri warning.
Tweak email subject.
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -3,6 +3,8 @@ ruby "1.9.3"
|
||||
|
||||
gem 'rails', '3.2.19'
|
||||
|
||||
gem 'nokogiri'
|
||||
|
||||
gem 'pg'
|
||||
gem 'spree', :github => 'openfoodfoundation/spree', :branch => '1-3-stable'
|
||||
gem 'spree_i18n', :github => 'spree/spree_i18n'
|
||||
|
||||
@@ -546,6 +546,7 @@ DEPENDENCIES
|
||||
letter_opener
|
||||
momentjs-rails
|
||||
newrelic_rpm
|
||||
nokogiri
|
||||
oj
|
||||
paperclip
|
||||
perftools.rb
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require 'devise/mailers/helpers'
|
||||
|
||||
class ProducerMailer < Spree::BaseMailer
|
||||
include Devise::Mailers::Helpers
|
||||
|
||||
@@ -7,14 +8,14 @@ class ProducerMailer < Spree::BaseMailer
|
||||
@coordinator = order_cycle.coordinator
|
||||
@order_cycle = order_cycle
|
||||
|
||||
# TODO: consider what happens if there is more than one distributor
|
||||
subject = "[#{Spree::Config[:site_name]}] Order cycle report"
|
||||
|
||||
if @order_cycle.distributors.count > 0
|
||||
first_producer = @order_cycle.distributors[0]
|
||||
@distribution_date = @order_cycle.pickup_time_for first_producer
|
||||
subject += " for #{@distribution_date}" if @distribution_date.size > 0
|
||||
end
|
||||
|
||||
subject = "[#{Spree::Config[:site_name]}] Order cycle report for #{@distribution_date}"
|
||||
|
||||
@orders = Spree::Order.complete.not_state(:canceled).managed_by(@producer.owner)
|
||||
@line_items = []
|
||||
@orders.each do |o|
|
||||
|
||||
Reference in New Issue
Block a user