Class: NcrDispatcher

Inherits:
LinearDispatcher show all
Defined in:
lib/ncr_dispatcher.rb

Overview

This is a temporary way to handle a notification preference that will eventually be managed at the user level www.pivotaltracker.com/story/show/87656734

Instance Method Summary collapse

Methods inherited from LinearDispatcher

#deliver_new_cart_emails, #email_next_approver, #next_approval, #on_approval_status_change

Methods inherited from Dispatcher

#deliver_new_cart_emails, deliver_new_cart_emails, #email_approver, #email_observers, #email_sent_confirmation, initialize_dispatcher, #on_approval_status_change, on_approval_status_change

Instance Method Details

#final_approval(cart) ⇒ Object


11
12
13
# File 'lib/ncr_dispatcher.rb', line 11

def final_approval(cart)
  cart.ordered_approvals.last
end

#requires_approval_notice?(approval) ⇒ Boolean


7
8
9
# File 'lib/ncr_dispatcher.rb', line 7

def requires_approval_notice?(approval)
  final_approval(approval.cart) == approval
end