From 62415991c04f6b5eaeec982000fbdd3848863269 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 1 Sep 2015 20:11:45 +0200 Subject: [PATCH] Fixes an issue found on comments using the dev_seed --- app/models/comment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index c23c5c993..77cbd166e 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -9,7 +9,7 @@ class Comment < ActiveRecord::Base validates :body, presence: true validates :user, presence: true - belongs_to :commentable, polymorphic: true, counter_cache: true + belongs_to :commentable, -> { with_hidden }, polymorphic: true, counter_cache: true belongs_to :user, -> { with_hidden } has_many :flags, :as => :flaggable