Module: Spree::Admin::AdjustmentsHelper

Defined in:
app/helpers/spree/admin/adjustments_helper.rb

Instance Method Summary collapse

Instance Method Details

#adjustment_state(adjustment) ⇒ Object



6
7
8
9
# File 'app/helpers/spree/admin/adjustments_helper.rb', line 6

def adjustment_state(adjustment)
  icon = adjustment.finalized? ? 'lock' : 'unlock'
  (:span, '', class: "fa fa-#{icon}")
end

#display_adjustable(adjustable) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'app/helpers/spree/admin/adjustments_helper.rb', line 11

def display_adjustable(adjustable)
  case adjustable
  when Spree::LineItem
      display_line_item(adjustable)
  when Spree::Shipment
      display_shipment(adjustable)
  when Spree::Order
      display_order(adjustable)
  end
end