[openstreetmap/openstreetmap-website] [WIP] Allow reporting of abusive users to moderators or admins (#1576)

Tom Hughes notifications at github.com
Wed Mar 14 17:52:41 UTC 2018


tomhughes commented on this pull request.



> +
+  # Check if more statuses are needed
+  enum :status => %w[open ignored resolved]
+
+  scope :with_status, ->(issue_status) { where(:status => statuses[issue_status]) }
+
+  def read_reports
+    resolved_at.present? ? reports.where("updated_at < ?", resolved_at) : nil
+  end
+
+  def unread_reports
+    resolved_at.present? ? reports.where("updated_at >= ?", resolved_at) : reports
+  end
+
+  include AASM
+  aasm :column => :status, :no_direct_assignment => true do

Okay, just thought I'd ask the question.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1576#discussion_r174552937
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180314/7b452da9/attachment.html>


More information about the rails-dev mailing list