[openstreetmap/openstreetmap-website] Support versions in elements multi fetch (PR #3715)

mmd notifications at github.com
Sun Sep 25 13:39:03 UTC 2022


ElementsApiController seems like a good way to maximize code reuse. However, I find things like  `current_model = controller_name.classify.constantize` and `old_model = "Old#{controller_name.classify}".constantize` too difficult to read for a low skilled dev. Given that it would only save us a few lines of code, it feels a bit over-engineered to me.

I wouldn't mind to see a bit more code duplication here, for the sake of better code readability.

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

Message ID: <openstreetmap/openstreetmap-website/pull/3715/c1257196446 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220925/c12cf892/attachment.htm>


More information about the rails-dev mailing list