[openstreetmap/openstreetmap-website] Display how long until a note will disappear (PR #3676)

Harry Wood notifications at github.com
Fri Sep 2 01:52:08 UTC 2022


@harry-wood commented on this pull request.



> @@ -23,4 +23,9 @@ def note_author(author, link_options = {})
       link_to h(author.display_name), link_options.merge(:controller => "/users", :action => "show", :display_name => author.display_name)
     end
   end
+
+  def disappear_date(closed_date)
+    date = closed_date + 7.days

I feel like this 7 should be a constant defined somewhere. I saw it appearing as magic number [here](https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/api/notes_controller.rb#L356) for the api.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3676#pullrequestreview-1094224601
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3676/review/1094224601 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220901/78583099/attachment.htm>


More information about the rails-dev mailing list