Allow deleting of category, when there are only deleted articles left.

This commit is contained in:
Benjamin Meichsner 2013-03-17 20:11:57 +01:00
parent 931bb1d7ca
commit 528295884e
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class ArticleCategory < ActiveRecord::Base
protected
def check_for_associated_articles
raise I18n.t('activerecord.errors.has_many_left', collection: Article.model_name.human) if articles.exists?
raise I18n.t('activerecord.errors.has_many_left', collection: Article.model_name.human) if articles.undeleted.exists?
end
end