]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/issue.rb
Merge pull request #4813 from AntonKhorev/no-fst-italic
[rails.git] / app / models / issue.rb
index 54947be303d569e76691e7959b17b7568a7e69ab..a3f82ee40b11881bddf5d5226404f8209668f614 100644 (file)
@@ -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