documentation/app/models/tag.rb

6 lines
134 B
Ruby
Raw Normal View History

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