Topic: has_many :through association

Hi, I have a user. User has_many accounts where a account can be of type personal or professional. Also, the User has_many transactions where a transaction can be of type casual or serious. Each entity has its own model. For e.g.: User, Account, PersonalAccount, ProfessionalAccount, Transaction, CasualTransaction and SeriousTransaction.

Can you suggest me what should be proper association between them?

Re: has_many :through association

PersonalAccount and ProfessionalAccount should inherit from Account.  Likewise with Transactions.

class User < ActiveRecord
  has_many :accounts
  has_many :transactions
end

class Account < ActiveRecord
  belongs_to :user
end

class Transaction < ActiveRecord
  belongs_to :user
end