Module: Spree::Admin::AdjustmentsHelper
- Defined in:
- app/helpers/spree/admin/adjustments_helper.rb
Instance Method Summary collapse
Instance Method Details
#adjustment_state(adjustment) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/spree/admin/adjustments_helper.rb', line 4 def adjustment_state(adjustment) state = adjustment.state.to_sym icon = { closed: 'lock', open: 'unlock' } content_tag(:span, '', class: "fa fa-#{ icon[state] }") end |
#display_adjustable(adjustable) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/spree/admin/adjustments_helper.rb', line 10 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 |