X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0e78061cdba5cfb3f299f57b7643d2b396ee235b..441629064682aeccdf024d96235d6362d08d54ea:/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