21 lines
650 B
Ruby
21 lines
650 B
Ruby
class PProductRefSpec < ApplicationRecord
|
|
belongs_to :p_product_ref
|
|
belongs_to :p_spec_type
|
|
belongs_to :p_spec_value
|
|
|
|
accepts_nested_attributes_for :p_spec_type, :p_spec_value
|
|
|
|
validates :p_spec_type_id, :p_spec_value_id, presence: true
|
|
|
|
acts_as_sorting :fields => {
|
|
:id => {:name => "ID"},
|
|
:p_product_ref => {:name => "Référence produit", :reorder => true},
|
|
:p_product_ref_id => {:name => "ID Ref produit", :reorder => true},
|
|
:p_spec_type => {:name => "Type", :reorder => true},
|
|
:p_spec_value => {:name => "Valeur", :reorder => true},
|
|
|
|
:actions => {:name => "Actions", :reorder => true}
|
|
|
|
}
|
|
end
|