spree/spree — pull request #1468 by r3ap3r2004 (2012-04-30 13:59:15+00:00)
Title: Return the proper line-item.

The function add_variant in order.rb returns different values depending on if the object exists in the line items already or not.

This change causes the function to return a consistent value for both cases allowing the return value to be used in the calling method.

Note: core/app/controllers/spree/admin/line_items_controller.rb is expecting this return value. But if the item already exists then the return value is all line items rather than the newly added line item.