From dc92de771e870b65401c623fa704639ce7fe5bdc Mon Sep 17 00:00:00 2001 From: Julius Date: Sat, 4 Jan 2014 21:39:11 +0100 Subject: [PATCH] Comment on ArticlePrices without Article association --- app/models/order_article.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/order_article.rb b/app/models/order_article.rb index b7c69c7d..e4b35606 100644 --- a/app/models/order_article.rb +++ b/app/models/order_article.rb @@ -115,6 +115,12 @@ class OrderArticle < ActiveRecord::Base # Creates a new article_price if neccessary # Set created_at timestamp to order ends, to make sure the current article price isn't changed create_article_price!(price_attributes.merge(created_at: order.ends)) and save + # TODO: The price_attributes do not include an article_id so that + # the entry in the database will not "know" which article is + # referenced. Let us check the effect of that and change it or + # comment on the meaning. + # Possibly this is the real reason why the global price is not + # affected instead of the `created_at: order.ends` injection. end # Updates ordergroup values