This commit is contained in:
Nicolas Bally 2017-11-13 22:29:52 +01:00
parent 106fb31f96
commit 846dc504fd
2 changed files with 4 additions and 3 deletions

View File

@ -8,9 +8,9 @@ class Admin::ContactsController < ApplicationController
@contacts = Contact.order("created_at DESC") @contacts = Contact.order("created_at DESC")
if params[:status] if params[:status]
@contacts = @contacts.where(:status => params[:status]) @contacts = @contacts.where(:contact_status => params[:status])
else else
@contacts = @contacts.where("archived IS NULL or archived = 0") @contacts = @contacts.where(:contact_status => "En cours")
end end
end end

View File

@ -6,7 +6,7 @@
%p %p
-["En cours", "Signés","En attente", "Archivé"].each do |status| -["En cours", "Signés","En attente", "Archivé"].each do |status|
=link_to "Actifs", admin_contacts_path(:status => status) =link_to status, admin_contacts_path(:status => status)
@ -16,6 +16,7 @@
%tr %tr
%td %td
%td %td
%td
%td %td
Date Date
%td %td