Sha256: 1eebde9a96fd3152d9d6950a14e38f8c2c850c7739aa7939041ab8cda7312a14

Contents?: true

Size: 205 Bytes

Versions: 3

Compression:

Stored size: 205 Bytes

Contents

class Contact < ActiveRecord::Base
  belongs_to :user
  belongs_to :contactable, polymorphic: true
  has_one    :profile, as: :profileable, dependent: :destroy
  accepts_nested_attributes_for :profile
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
poly_belongs_to-1.0.0 test/dummy/app/models/contact.rb
poly_belongs_to-0.3.0 test/dummy/app/models/contact.rb
poly_belongs_to-0.2.9 test/dummy/app/models/contact.rb