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

  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
