Sha256: e59b8ba2b93fefc7247ab361e99e92205a8858552337142f82428a59beec55ac

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

class Account < ActiveRecord::Base
  before_create :set_initial_balance
  
private
  def set_initial_balance
    self.balance = 0
    true
  end
end

class BankAccount < Account
  has_extra_data do
    belongs_to :bank
  end
end

class CreditCard < Account
  has_extra_data
end

class UnusualForeignKey < Account
  has_extra_data :foreign_key => "unusual_foreign_key"
end

class UnusualTableName < Account
  has_extra_data :table_name => "unusual_table_name"
end

class Bank < ActiveRecord::Base
  has_one :bank_account
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
super_sti-0.2.1 spec/test_classes.rb