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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb
index a25785e08..a5ee62263 100644
--- a/app/models/tag.rb
+++ b/app/models/tag.rb
@@ -1,5 +1,11 @@
 class Tag < ApplicationRecord
+  has_and_belongs_to_many :statuses
+
   HASHTAG_RE = /[?:^|\s|\.|>]#([[:word:]_]+)/i
 
   validates :name, presence: true, uniqueness: true
+
+  def to_param
+    name
+  end
 end