[openstreetmap/openstreetmap-website] Add openplaques:id support and refactor the formatters (#2621)

François de Metz notifications at github.com
Sat May 9 16:45:29 UTC 2020


This is an early PR to gather feedbacks about the refactoring of the value handling when I wanted to fix #2405.

I extracted each formatter to a class. Each class has a format method that returns the html or `nil` if nothing is matching.

I believe the formatters would need to be moved elsewhere. Any suggestions about it? Tests also need to be splitted/moved.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2621

-- Commit Summary --

  * Add openplaques:id link.
  * WIP refactoring of the formatters.

-- File Changes --

    M app/helpers/browse_tags_helper.rb (352)
    M test/helpers/browse_tags_helper_test.rb (200)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2621.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2621.diff

-- 
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/2621
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200509/ec168a62/attachment.htm>


More information about the rails-dev mailing list