From e2e6ff305b54b0550b7eda34361cf5030cc36566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A9?= Date: Tue, 19 Oct 2021 19:01:02 +0200 Subject: [PATCH] bugfix caching p_product_cat_id --- app/models/p_product_ref.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/p_product_ref.rb b/app/models/p_product_ref.rb index ce4686a..31ae21e 100644 --- a/app/models/p_product_ref.rb +++ b/app/models/p_product_ref.rb @@ -41,7 +41,7 @@ class PProductRef < ApplicationRecord acts_as_sorting :fields => { :id => {:name => "Id", :reorder => true}, - :p_product_cat => {:name => "Catégorie", :reorder => true}, + :p_product_cat => {:name => "Catégorie", :reorder => true, :sort_name => "cc_p_product_cat_id",}, :ref => {:name => "Référence"}, :cc_name => {:name => "Produit"}, # :description => {:name => "Description"}, @@ -54,7 +54,7 @@ class PProductRef < ApplicationRecord :actions => {:name => "Actions", :reorder => false} } - acts_as_caching :fields => [:sorecop, :deee, :name, :code] + acts_as_caching :fields => [:sorecop, :deee, :name, :code, :p_product_cat_id] include PgSearch::Model pg_search_scope :global_search, against: [:ref, :cc_name],