Module: Admin::OrdersHelper
- Defined in:
- app/helpers/admin/orders_helper.rb
Instance Method Summary collapse
-
#event_links ⇒ Object
Renders all the extension partials that may have been specified in the extensions.
-
#render_txn_partials(order) ⇒ Object
Renders all the txn partials that may have been specified in the extensions.
Instance Method Details
#event_links ⇒ Object
Renders all the extension partials that may have been specified in the extensions
11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/admin/orders_helper.rb', line 11 def event_links links = [] @order_events.sort.each do |event| if @order.send("can_#{event}?") links << (t(event), fire_admin_order_url(@order, :e => event), { :method => :put, :confirm => t("order_sure_want_to", :event => t(event)) }) end end links.join(' ').html_safe end |
#render_txn_partials(order) ⇒ Object
Renders all the txn partials that may have been specified in the extensions
4 5 6 7 8 |
# File 'app/helpers/admin/orders_helper.rb', line 4 def render_txn_partials(order) @txn_partials.inject("") do |extras, partial| extras += render :partial => partial, :locals => {:payment => order} end end |