From e911fa598c6284db952b77fed2ae401657161b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A9?= Date: Thu, 14 Oct 2021 18:32:53 +0200 Subject: [PATCH] Update Type constant --- app/models/p_spec_type.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/p_spec_type.rb b/app/models/p_spec_type.rb index 42875d3..ec3b632 100644 --- a/app/models/p_spec_type.rb +++ b/app/models/p_spec_type.rb @@ -1,6 +1,7 @@ class PSpecType < ApplicationRecord has_many :p_product_ref_specs - TYPES = ["Ram", "Stockage"] + + TYPES = self.distinct.pluck(:name) acts_as_sorting :fields => { :id => {:name => "ID"},