From 83c2c466fb407607948306b59aebfc1767a4ad7e Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 21 May 2019 01:55:03 -0500 Subject: use dots instead of colons for tag scopes --- app/models/tag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/tag.rb') diff --git a/app/models/tag.rb b/app/models/tag.rb index 04b902885..47bbfea1d 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -19,7 +19,7 @@ class Tag < ApplicationRecord has_many :featured_tags, dependent: :destroy, inverse_of: :tag has_one :account_tag_stat, dependent: :destroy - HASHTAG_NAME_RE = '[[:word:]:_\-]*[[:alpha:]:_·\-][[:word:]:_\-]*' + HASHTAG_NAME_RE = '[[:word:]._\-]*[[:alpha:]._·\-][[:word:]._\-]*' HASHTAG_RE = /(?:^|[^\/\)\w])#(#{HASHTAG_NAME_RE})/i validates :name, presence: true, uniqueness: true, format: { with: /\A#{HASHTAG_NAME_RE}\z/i } -- cgit