diff --git a/app/views/admin/p_customer_sheets/index.html.haml b/app/views/admin/p_customer_sheets/index.html.haml index 8657d2a..2ba4b79 100644 --- a/app/views/admin/p_customer_sheets/index.html.haml +++ b/app/views/admin/p_customer_sheets/index.html.haml @@ -23,7 +23,7 @@ %td Statut : - =select_tag "search[state]", options_for_select([["",""]]+PCustomerSheet.group(:state).all.map{|a| [a.state, a.state]}, params[:search][:state]) + =select_tag "search[state]", options_for_select([["",""]]+PCustomerSheet.select(:state).group(:state).all.map{|a| [a.state, a.state]}, params[:search][:state]) %td Numéro d'offre : diff --git a/app/views/admin/p_customers/index.html.haml b/app/views/admin/p_customers/index.html.haml index c7ddc07..af02f16 100644 --- a/app/views/admin/p_customers/index.html.haml +++ b/app/views/admin/p_customers/index.html.haml @@ -34,7 +34,7 @@ %td Raison de blocage : - =select_tag "search[disabled_raison]", options_for_select(PCustomer.group("disabled_raison").map{|p| [p.disabled_raison]}, params[:search][:disabled_raison]) + =select_tag "search[disabled_raison]", options_for_select(PCustomer.select("disabled_raison").group("disabled_raison").map{|p| [p.disabled_raison]}, params[:search][:disabled_raison]) -if false