Commit 1f5c99ee84127d2740854a0fcf5cb90fa25e28a3

Authored by Victor Costa
1 parent dfd04c06

comment_paragraph: fix article validation

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
plugins/comment_paragraph/lib/ext/article.rb
... ... @@ -8,7 +8,7 @@ class Article
8 8  
9 9 def body_change_with_comments
10 10 if body && body_changed? && !self.comments.empty?
11   - paragraphs_with_comments = self.comments.where("'paragraph_id' IS NOT NULL")
  11 + paragraphs_with_comments = self.comments.where("paragraph_id IS NOT NULL")
12 12 errors[:base] << (N_('You are unable to change the body of the article when paragraphs are commented')) unless (paragraphs_with_comments).empty?
13 13 end
14 14 end
... ...