[openstreetmap/openstreetmap-website] API element resources - redaction paths (PR #5656)

Andy Allan notifications at github.com
Sat Feb 15 12:24:14 UTC 2025


gravitystorm left a comment (openstreetmap/openstreetmap-website#5656)

I think my main comment here is about the resource naming. It doesn't feel quite right to say that we are creating a "redaction" since we need to pass a redaction_id while doing so. It feels to me like the resource name is not quite right, but I can't find a better name. I've done some research to see if there is an existing term for "individual parts of a redaction" but with no success. Possible terms would include things like RedactionEntry, RedactionMember, etc, or if it makes more sense to treat each individual thing as a "Redaction", then we could rename redactions to "RedactionCollection" or similar.

But this is all too much work I think, and not worth it. So perhaps we should stick with what we have here, even despite the names being not quite right.

Using the code for a different action (i.e. calling the `destroy` action from within the `create` action) feels weird, but I guess it works, given the lack of templates etc. An alternative would be to have a private method that is called from both actions, which might be more conventional?

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

Message ID: <openstreetmap/openstreetmap-website/pull/5656/c2660897375 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250215/f8c62310/attachment.htm>


More information about the rails-dev mailing list