[openstreetmap/openstreetmap-website] Add deactivates_at date to user blocks (PR #5069)

Anton Khorev notifications at github.com
Mon Aug 19 11:35:05 UTC 2024


@AntonKhorev commented on this pull request.



> @@ -28,6 +29,8 @@
 class UserBlock < ApplicationRecord
   validate :moderator_permissions
   validates :reason, :characters => true
+  validates :deactivates_at, :comparison => { :greater_than_or_equal_to => :ends_at }, :if => -> { !needs_view }

updated to `:unless`

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

Message ID: <openstreetmap/openstreetmap-website/pull/5069/review/2245323199 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240819/bab7bc3a/attachment.htm>


More information about the rails-dev mailing list