Allows commenting Proposals in Comment validation

This commit is contained in:
kikito
2015-09-12 14:04:50 +02:00
parent f80d7771a1
commit 231665020e

View File

@@ -10,7 +10,7 @@ class Comment < ActiveRecord::Base
validates :body, presence: true
validates :user, presence: true
validates_inclusion_of :commentable_type, in: ["Debate"]
validates_inclusion_of :commentable_type, in: ["Debate", "Proposal"]
validate :validate_body_length