X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b70da7b8ea15ab48bb2f34155567cea6dffc8fc9..2029133a85f5bafe4f165558a227194704a87620:/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