Sha256: 59ecafbf5ee9cdf443a20f6ad0b53762dc566ef2c4ab4d639c8fe51dcd1e2622

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

module C80Estate
  class Property < ActiveRecord::Base
    belongs_to :atype
    belongs_to :owner, :polymorphic => true
    has_many :item_props, :dependent => :destroy
    has_many :pphotos, :dependent => :destroy   # одна или несколько фоток
    accepts_nested_attributes_for :pphotos,
                                  :reject_if => lambda { |attributes|
                                    !attributes.present?
                                  },
                                  :allow_destroy => true
    has_many :areas, :dependent => :destroy
    has_many :comments, :dependent => :destroy
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
c80_estate-0.1.0 app/models/c80_estate/property.rb