diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/featured_tag.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/featured_tag.rb b/app/models/featured_tag.rb index 4a8d7224a..ec234a6fd 100644 --- a/app/models/featured_tag.rb +++ b/app/models/featured_tag.rb @@ -60,5 +60,6 @@ class FeaturedTag < ApplicationRecord def validate_tag_name errors.add(:name, :blank) if @name.blank? errors.add(:name, :invalid) unless @name.match?(/\A(#{Tag::HASHTAG_NAME_RE})\z/i) + errors.add(:name, :taken) if FeaturedTag.by_name(@name).where(account_id: account_id).exists? end end |