]> git.openstreetmap.org Git - rails.git/blob - app/models/issue_comment.rb
Add frozen_string_literal comments to ruby files
[rails.git] / app / models / issue_comment.rb
1 # frozen_string_literal: true
2
3 # == Schema Information
4 #
5 # Table name: issue_comments
6 #
7 #  id         :integer          not null, primary key
8 #  issue_id   :integer          not null
9 #  user_id    :integer          not null
10 #  body       :text             not null
11 #  created_at :datetime         not null
12 #  updated_at :datetime         not null
13 #
14 # Indexes
15 #
16 #  index_issue_comments_on_issue_id  (issue_id)
17 #  index_issue_comments_on_user_id   (user_id)
18 #
19 # Foreign Keys
20 #
21 #  issue_comments_issue_id_fkey  (issue_id => issues.id)
22 #  issue_comments_user_id_fkey   (user_id => users.id)
23 #
24
25 class IssueComment < ApplicationRecord
26   belongs_to :issue
27   belongs_to :user
28
29   validates :body, :presence => true, :characters => true
30
31   def body
32     RichText.new("markdown", self[:body])
33   end
34 end