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.39 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.38 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.37 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.36 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.35 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.34 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.33 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.32 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.31 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.30 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.29 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.28 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.27 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.26 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.25 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.24 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.23 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.22 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.21 app/models/c80_estate/prop_name.rb
c80_estate-0.1.0.20 app/models/c80_estate/prop_name.rb