diff options
author | pluralcafe-docker <git@plural.cafe> | 2019-01-04 21:19:55 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2019-01-04 21:19:55 +0000 |
commit | 74134e490c49d8a7d88cc69720e22cd88cee9233 (patch) | |
tree | bd7fc8d41f7887037401ff86c81bc93d5fb00d01 /app/models/concerns | |
parent | 797a8429a0deb511e6d6092edad39f856231534e (diff) | |
parent | 0acd51acdc1e670bf57f58671cb8e30743782c63 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/domain_normalizable.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/concerns/domain_normalizable.rb b/app/models/concerns/domain_normalizable.rb new file mode 100644 index 000000000..dff3e5414 --- /dev/null +++ b/app/models/concerns/domain_normalizable.rb @@ -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 |