# frozen_string_literal: true
module C
  class AuthorRecord < ApplicationRecord
    belongs_to :authored, polymorphic: true
    belongs_to :user

    validates :user, presence: true

    def author
      user.name
    end
  end
end