Strip whitespace from webhook URLs

Prevents validation errors when users accidentally include trailing spaces in webhook URLs.
This commit is contained in:
Rob Zolkos
2026-01-15 22:13:47 -05:00
parent 64059e2351
commit d8b6ea8bba
+1
View File
@@ -36,6 +36,7 @@ class Webhook < ApplicationRecord
after_create :create_delinquency_tracker!
normalizes :subscribed_actions, with: ->(value) { Array.wrap(value).map(&:to_s).uniq & PERMITTED_ACTIONS }
normalizes :url, with: -> { it.strip }
validates :name, presence: true
validate :validate_url