X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0654be27f9826e6cca4b88c03b39517214612351..f19e0c36f5fad722c4b6c53e8d743c2843fea326:/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