このコミットが含まれているのは:
2026-07-13 12:44:33 +09:00
コミット 9a6e6f6053
4個のファイルの変更137行の追加3行の削除
+2 -2
ファイルの表示
@@ -57,7 +57,7 @@ class Post < ApplicationRecord
attribute :version_no, :integer, default: 1
before_validation :normalise_url
before_validation :normalise_url, if: :will_save_change_to_url?
validates :url, presence: true, uniqueness: true
validates :video_ms, numericality: { only_integer: true, greater_than: 0 }, allow_nil: true
@@ -180,7 +180,7 @@ class Post < ApplicationRecord
u.host = u.host.downcase if u.host
u.path = u.path.sub(/\/\Z/, '') if u.path.present?
self.url = u.to_s
self.url = PostUrlSanitisationRule.sanitise(u.to_s)
rescue URI::InvalidURIError
;
end