You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
259 B

  1. # frozen_string_literal: true
  2. module DomainNormalizable
  3. extend ActiveSupport::Concern
  4. included do
  5. before_save :normalize_domain
  6. end
  7. private
  8. def normalize_domain
  9. self.domain = TagManager.instance.normalize_domain(domain&.strip)
  10. end
  11. end