I have an account model as follows (simplified):
class Account < ActiveRecord::Base attr_accessible :account_number, :display_name, :master_account_id has_many :child_accounts, :class_name => "Account", :foreign_key => "id" belongs_to :master_account, :class_name => "Account", :foreign_key => "master_account_id" end
@account.master_account is currently working correctly, but I also want to have access to @account.child_accounts - what do I need to do to fix this?
source share