This commit is contained in:
parent
cd252b794e
commit
1aaec701bb
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
|||
class Tag < ApplicationRecord
|
||||
has_and_belongs_to_many :statuses
|
||||
|
||||
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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue