X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4abd9cfcf19701bf43322374c5df6dd586449e54..a6b5f2f56d00efef7c8bdbe451db2655731f5ae6:/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