X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4abd9cfcf19701bf43322374c5df6dd586449e54..8df3c7b12a0530a315e2b95ba67221c20fbffaef:/app/models/report.rb diff --git a/app/models/report.rb b/app/models/report.rb index 346c5eea9..1475197fe 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -25,8 +25,6 @@ class Report < ApplicationRecord belongs_to :issue, :counter_cache => true belongs_to :user - validates :issue, :presence => true - validates :user, :presence => true validates :details, :presence => true, :characters => true validates :category, :presence => true @@ -38,4 +36,8 @@ class Report < ApplicationRecord else %w[other] end end + + def details + RichText.new("markdown", self[:details]) + end end