Create DomainNormalizable#normalize_domain (#9631)
parent
9f74c2b877
commit
75e3538da4
@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DomainNormalizable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
before_validation :normalize_domain
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def normalize_domain
|
||||
self.domain = TagManager.instance.normalize_domain(domain)
|
||||
end
|
||||
end
|
Loading…
Reference in new issue