mastodon/app/models/tag.rb

6 lines
134 B
Ruby
Raw Normal View History

2016-11-04 18:12:59 +00:00
class Tag < ApplicationRecord
HASHTAG_RE = /[?:^|\s|\.|>]#([[:word:]_]+)/i
validates :name, presence: true, uniqueness: true
end