Soc/app/models/tag.rb

13 lines
250 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Tag < ApplicationRecord
validates :name, presence: true
2023-10-19 17:35:48 +00:00
has_many :microposts_tags
has_many :microposts, through: :microposts_tags
2024-01-06 11:10:56 +00:00
has_and_belongs_to_many :learning_goals
2023-10-19 18:56:39 +00:00
def to_param
name
end
end