foodcoop-adam/foodsoft

View on GitHub
app/views/group_orders/_switch_order.html.haml

Summary

Maintainability
Test Coverage
- orders = Order.open.reject{ |order| order == current_order }
- unless orders.empty?
  %h2= t '.title'
  %ul.unstyled
    - orders.each do |order|
      %li
        = link_to_ordering(order, 'data-confirm_switch_order' => true)
        - if order.ends
          = t '.remaining', remaining: time_ago_in_words(order.ends)