Circles are the conceptual opposite of lists. A list is a subdivision of your follows, a circle is a subdivision of your followers. Posting to a circle means making content available to only some of your followers. Circles have been internally supported in Mastodon for the purposes of federation since #8950, this adds the REST API necessary for making use of them in Mastodon itsef.
22 lines
549 B
Ruby
22 lines
549 B
Ruby
# frozen_string_literal: true
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: circles
|
|
#
|
|
# id :bigint(8) not null, primary key
|
|
# account_id :bigint(8) not null
|
|
# title :string default(""), not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
class Circle < ApplicationRecord
|
|
include Paginable
|
|
|
|
belongs_to :account
|
|
|
|
has_many :circle_accounts, inverse_of: :circle, dependent: :destroy
|
|
has_many :accounts, through: :circle_accounts
|
|
|
|
validates :title, presence: true
|
|
end
|