X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e731dd71a77ad4ad1e9db22535e89444bb98e5d9..d57dd1f4da4d4605f534607b69944e3c977e4db5:/app/models/issue_comment.rb diff --git a/app/models/issue_comment.rb b/app/models/issue_comment.rb index 0841295e1..8d150a02f 100644 --- a/app/models/issue_comment.rb +++ b/app/models/issue_comment.rb @@ -20,11 +20,13 @@ # issue_comments_user_id_fkey (user_id => users.id) # -class IssueComment < ActiveRecord::Base +class IssueComment < ApplicationRecord belongs_to :issue belongs_to :user validates :body, :presence => true, :characters => true - validates :user, :presence => true - validates :issue, :presence => true + + def body + RichText.new("markdown", self[:body]) + end end