]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/issue_comment.rb
Merge branch 'master' into feature/add-communities-page
[rails.git] / app / models / issue_comment.rb
index 0841295e1760120335d2e16ed79f57b20a9a67c2..8d150a02f8b88512fdf47070c162dfaadb2dd4e7 100644 (file)
 #  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