[openstreetmap/openstreetmap-website] Support versions in elements multi fetch (PR #3715)
Anton Khorev
notifications at github.com
Mon Sep 26 12:39:23 UTC 2022
> Given that it would only save us a few lines of code, it feels a bit over-engineered to me.
With a proper abstract base class, `NodesController` can be reduced to basically nothing.
> things like current_model = controller_name.classify.constantize and old_model = "Old#{controller_name.classify}".constantize too difficult to read
Looks like Rails still doesn't provide anything better than that to get model classes without naming them directly. But if that's really too scary, I can make a couple of methods in child controller classes that return their model classes.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3715#issuecomment-1257979146
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3715/c1257979146 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220926/b2ad32a3/attachment.htm>
More information about the rails-dev
mailing list