Adding hashtag model
This commit is contained in:
5
app/models/tag.rb
Normal file
5
app/models/tag.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class Tag < ApplicationRecord
|
||||
HASHTAG_RE = /[?:^|\s|\.|>]#([[:word:]_]+)/i
|
||||
|
||||
validates :name, presence: true, uniqueness: true
|
||||
end
|
Reference in New Issue
Block a user