[openstreetmap/openstreetmap-website] Add deactivates_at date to user blocks (PR #5069)
Tom Hughes
notifications at github.com
Sun Aug 18 11:44:15 UTC 2024
@tomhughes 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 }
I think this could be `:unless => -> { needs_view }`?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5069#pullrequestreview-2244288634
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5069/review/2244288634 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240818/20d1f0bd/attachment-0001.htm>
More information about the rails-dev
mailing list