Files
fizzy/app/models/tag.rb
T
2025-02-14 11:23:08 -06:00

15 lines
279 B
Ruby

class Tag < ApplicationRecord
include Filterable
belongs_to :account, default: -> { Current.account }
has_many :taggings, dependent: :destroy
has_many :bubbles, through: :taggings
validates :title, format: { without: /\A#/ }
def hashtag
"#" + title
end
end