Soc/app/models/micropost.rb

14 lines
257 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Micropost < ApplicationRecord
belongs_to :user
has_rich_text :content
validates :user,
:content,
presence: true
2023-10-19 17:35:48 +00:00
has_many :microposts_tags
has_many :tags, through: :microposts_tags
end