From 8185f988723dd95b814bcc5f03ccb3da94edbae4 Mon Sep 17 00:00:00 2001 From: voidSatisfaction Date: Thu, 7 Sep 2017 16:55:42 +0900 Subject: Feat add validation for report comment: characters under 1000 valid (#4833) --- app/models/report.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models') diff --git a/app/models/report.rb b/app/models/report.rb index 4d2552d30..479aa17bb 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -22,6 +22,8 @@ class Report < ApplicationRecord scope :unresolved, -> { where(action_taken: false) } scope :resolved, -> { where(action_taken: true) } + validates :comment, length: { maximum: 1000 } + def statuses Status.where(id: status_ids).includes(:account, :media_attachments, :mentions) end -- cgit