From 3c88f572a466dc7cdefac9a2f68d3572b89d8f7b Mon Sep 17 00:00:00 2001 From: Julius Date: Sat, 4 Jan 2014 21:22:57 +0100 Subject: [PATCH] When updating OrderArticle: save ArticlePrice association --- app/models/order_article.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/order_article.rb b/app/models/order_article.rb index 3eb97aea..bf080464 100644 --- a/app/models/order_article.rb +++ b/app/models/order_article.rb @@ -110,7 +110,7 @@ class OrderArticle < ActiveRecord::Base # Updates also price attributes of article if update_current_price is selected if update_current_price article.update_attributes!(price_attributes) - self.article_price = article.article_prices.first # Assign new created article price to order article + self.article_price = article.article_prices.first and save # Assign new created article price to order article else # Creates a new article_price if neccessary # Set created_at timestamp to order ends, to make sure the current article price isn't changed