X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..f6141277d5a727fdec5c7bb26e35b17b1e6f495d:/app/models/issue.rb?ds=inline diff --git a/app/models/issue.rb b/app/models/issue.rb index 54947be30..a3f82ee40 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -50,11 +50,11 @@ class Issue < ApplicationRecord scope :visible_to, ->(user) { where(:assigned_role => user.roles.map(&:role)) } def read_reports - resolved_at.present? ? reports.where("updated_at < ?", resolved_at) : nil + resolved_at.present? ? reports.where(:updated_at => ...resolved_at) : nil end def unread_reports - resolved_at.present? ? reports.where("updated_at >= ?", resolved_at) : reports + resolved_at.present? ? reports.where(:updated_at => resolved_at..) : reports end include AASM