mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Show error messages when adding permalinks in the admin UI (#12545)
Also, check for uniqueness of permalinks before attempting to save.
This commit is contained in:
committed by
GitHub
parent
c89f97aafe
commit
70970bb791
@@ -8,6 +8,8 @@ class Permalink < ActiveRecord::Base
|
||||
|
||||
before_validation :normalize_url
|
||||
|
||||
validates :url, uniqueness: true
|
||||
|
||||
class Normalizer
|
||||
attr_reader :source
|
||||
|
||||
|
||||
Reference in New Issue
Block a user