about summary refs log tree commit diff
path: root/app/models/tag.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/tag.rb')
-rw-r--r--app/models/tag.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb
new file mode 100644
index 000000000..a25785e08
--- /dev/null
+++ b/app/models/tag.rb
@@ -0,0 +1,5 @@
+class Tag < ApplicationRecord
+  HASHTAG_RE = /[?:^|\s|\.|>]#([[:word:]_]+)/i
+
+  validates :name, presence: true, uniqueness: true
+end