default sorting
This commit is contained in:
parent
9660ba7147
commit
58b262a14f
@ -13,7 +13,7 @@ class Admin::SorecopTaxesController < ApplicationController
|
|||||||
def index
|
def index
|
||||||
@sorecop_taxes = SorecopTax.all
|
@sorecop_taxes = SorecopTax.all
|
||||||
|
|
||||||
@sorecop_taxes = sort_by_sorting(@sorecop_taxes, "id DESC")
|
@sorecop_taxes = sort_by_sorting(@sorecop_taxes, "sorecop_cat_id ASC")
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{
|
format.html{
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ class SorecopTax < ApplicationRecord
|
|||||||
:critere_min => {:name => "Critère mini (Go)", :reorder => true},
|
:critere_min => {:name => "Critère mini (Go)", :reorder => true},
|
||||||
:critere_max => {:name => "Critère maxi (Go)", :reorder => true},
|
:critere_max => {:name => "Critère maxi (Go)", :reorder => true},
|
||||||
:fixed_price => {:name => "Prix forfaitaire", :reorder => true, :format => :boolean},
|
:fixed_price => {:name => "Prix forfaitaire", :reorder => true, :format => :boolean},
|
||||||
:sorecop_cat => {:name => "Catégorie SORECOP",member_label: :name, :reorder => false},
|
:sorecop_cat => {:name => "Catégorie SORECOP",member_label: :name, :reorder => true, :sort_name => "sorecop_taxes.sorecop_cat_id"},
|
||||||
:price => {:name => "Prix", :reorder => false, as: :currency},
|
:price => {:name => "Prix", :reorder => false, as: :currency},
|
||||||
:actions => {:name => "Actions", :reorder => true}
|
:actions => {:name => "Actions", :reorder => true}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user