Clean up OrderArticle#new form and related stuff
This commit is contained in:
parent
baa5f16cfc
commit
01264bc0ac
7 changed files with 13 additions and 6 deletions
|
|
@ -199,7 +199,9 @@ class OrderArticle < ActiveRecord::Base
|
|||
private
|
||||
|
||||
def article_and_price_exist
|
||||
errors.add(:article, I18n.t('model.order_article.error_price')) if !(article = Article.find(article_id)) || article.fc_price.nil?
|
||||
errors.add(:article, I18n.t('model.order_article.error_price')) if !(article = Article.find(article_id)) || article.fc_price.nil?
|
||||
rescue
|
||||
errors.add(:article, I18n.t('model.order_article.error_price'))
|
||||
end
|
||||
|
||||
# Associate with current article price if created in a finished order
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue