Sha256: 7d3abf37091b088528a39eab2e4538b327dc5ee359fb441aafe16b3f14b4f930

Contents?: true

Size: 737 Bytes

Versions: 40

Compression:

Stored size: 737 Bytes

Contents

module C80Estate
  class PropName < ActiveRecord::Base

    # validates_with PropNameValidator

    # у этой (абстрактной по сути) характеристики есть конкретные порождения - свойства.
    has_many :item_props, :dependent => :destroy
    has_and_belongs_to_many :atypes, :join_table => 'c80_estate_atypes_prop_names'

    # каждое свойство принадлежит какой-то единице измерения
    belongs_to :uom

    # accepts_nested_attributes_for :uom
    # has_and_belongs_to_many :main_props
    # has_and_belongs_to_many :common_props
    # has_and_belongs_to_many :price_props
    default_scope {order(:title => :asc)}
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
c80_estate-0.1.0.19 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.18 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.17 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.16 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.15 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.14 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.13 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.12 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.11 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.10 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.9 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.8 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.7 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.6 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.5 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.4 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.3 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.2 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.1 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0 app/models/c80_estate/prop_name.rb