query performance improvements

This commit is contained in:
wvengen 2014-05-21 21:44:35 +02:00
parent 647b7f0430
commit 8473f16091
2 changed files with 15 additions and 14 deletions

View file

@ -30,11 +30,11 @@ class Supplier < ActiveRecord::Base
new_articles = Array.new
for article in articles.undeleted
# try to find the associated shared_article
shared_article = article.shared_article
shared_article = article.shared_article(self)
if shared_article # article will be updated
unequal_attributes = article.shared_article_changed?
unequal_attributes = article.shared_article_changed?(self)
unless unequal_attributes.blank? # skip if shared_article has not been changed
# try to convert different units