Yes, although #each is more rubyish:
@cart.line_items.each do |line_item| # do stuff end
Yes, although #each is more rubyish:
@cart.line_items.each do |line_item| # do stuff end
And if you need the indexes:
@card.line_items.each_with_index do | line_item, index |
Michael