@pablobm approved this pull request.
I say let's try this 🤞 Thank you @deevroman!
> @@ -34,4 +34,12 @@ def note_author(author, link_options = {})
:class => "mw-100 d-inline-block align-bottom text-truncate
text-wrap", :dir => "auto"
end
end
+
+ def soft_anonymous_notes_limit_reached?(anonymous_notes_count)
+ !current_user && anonymous_notes_count >= 5
+ end
+
+ def hard_anonymous_notes_limit_reached?(anonymous_notes_count)
+ !current_user && anonymous_notes_count >= 10
+ end
I think you are correct here, making these into pure functions instead of
expecting `@anonymous_notes_count` to exist 👍 (which was what I initially
suggested).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6593#pullrequestreview-3562007547
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6593/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev