Sha256: fc4715161bdfe662cb4df3757d6c28776e4d67686e0807d9482e69aaa82c8779

Contents?: true

Size: 491 Bytes

Versions: 5

Compression:

Stored size: 491 Bytes

Contents

class Person < ActiveRecord::Base
  has_many :buildings, :foreign_key => :owner_id, :inverse_of => :owner
  has_one :floor, :foreign_key => :tenant_id, :inverse_of => :tenant
  has_one :address, :through => :floor
  has_one :home, :through => :floor, :source => :building, :class_name => 'Building'

  has_many :contacts, :as => :contactable
  has_one :car, :dependent => :destroy
  has_and_belongs_to_many :roles
  
  has_many :files, :dependent => :destroy, :class_name => 'FileModel'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active_scaffold-3.4.17 test/mock_app/app/models/person.rb
active_scaffold-3.4.16 test/mock_app/app/models/person.rb
active_scaffold-3.4.14 test/mock_app/app/models/person.rb
active_scaffold-3.4.13 test/mock_app/app/models/person.rb
active_scaffold-3.4.12 test/mock_app/app/models/person.rb