Adding hashtag model
This commit is contained in:
parent
6471a548fe
commit
62292797ec
11 changed files with 60 additions and 9 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue