X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d73a5d4bc015d304e7b8863a0e927ac0b134e07b..4492118dbc2f65b8628a45d16e7e49fa6a3c7b13:/app/models/issue_comment.rb?ds=sidebyside 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