Wednesday, July 15, 2026 12:54:06 AM
> community_default.rb
# frozen_string_literal: true

class CommunityDefault < ApplicationRecord
  attribute :community_id, :integer
  attribute :server_id, :integer
  attribute :channel_id, :string

  belongs_to :community
  belongs_to :server

  def self.global
    where(channel_id: nil).first
  end

  def self.for_channel(channel)
    where(channel_id: channel.id.to_s).first
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7