diff --git a/plugins/comment_paragraph/lib/ext/article.rb b/plugins/comment_paragraph/lib/ext/article.rb index 978a72d..9ad813a 100644 --- a/plugins/comment_paragraph/lib/ext/article.rb +++ b/plugins/comment_paragraph/lib/ext/article.rb @@ -8,7 +8,7 @@ class Article def body_change_with_comments if body && body_changed? && !self.comments.empty? - paragraphs_with_comments = self.comments.where("'paragraph_id' IS NOT NULL") + paragraphs_with_comments = self.comments.where("paragraph_id IS NOT NULL") errors[:base] << (N_('You are unable to change the body of the article when paragraphs are commented')) unless (paragraphs_with_comments).empty? end end -- libgit2 0.21.2