Sha256: 3ce49ec0074e104c796be4a9b848c417dd5f5858ae07c28aabd5de9379716eea
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
# # # AUTO GENERATED MODEL # This model was auto generated by the CanvasSync Gem. # You can customize it as needed, but make sure you test # any changes you make to the auto generated methods. # class Account < ApplicationRecord include CanvasSync::Record include CanvasSync::Concerns::ApiSyncable # include CanvasSync::Concerns::Account::Ancestry # Add support for the ancestry Gem validates :canvas_id, uniqueness: true, presence: true has_many :admins, primary_key: :canvas_id, foreign_key: :canvas_account_id belongs_to :canvas_parent, class_name: 'Account', optional: true, primary_key: :canvas_id, foreign_key: :canvas_parent_account_id has_many :sub_accounts, class_name: 'Account', primary_key: :canvas_id, foreign_key: :canvas_parent_account_id has_many :groups, primary_key: :canvas_id, foreign_key: :canvas_account_id api_syncable({ name: :name, workflow_state: :workflow_state, canvas_parent_account_id: :parent_account_id, }, -> (api) { api.account(canvas_id) }) end
Version data entries
7 entries across 7 versions & 1 rubygems