[openstreetmap/openstreetmap-website] Hide the anonymous note creation form when the limit is exceeded (PR #6593)

Roman Deev notifications at github.com
Mon Dec 8 15:11:15 UTC 2025


@deevroman commented on this pull request.



> +<% soft_anonymous_notes_limit_reached = !current_user && @anonymous_notes_count >= 5
+   anonymous_notes_limit_reached = !current_user && @anonymous_notes_count >= 10
+   warn_class = anonymous_notes_limit_reached ? "alert-danger" : "alert-warning" %>

> Also I would rename the "normal" limit as hard_

Agreed. Corrected.

> I think this section is a bit too much code for a template. How about moving these to helpers?

I'm not a Ruby developer, so the code organization example was helpful. I suspect you're talking about creating an additional file, and it seems to me there's not much logic that can be moved to a separate file yet.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6593/review/3552554696 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251208/ed248bcb/attachment.htm>


More information about the rails-dev mailing list