diff --git a/app/controllers/admin/contacts_controller.rb b/app/controllers/admin/contacts_controller.rb index 27bc1d9..aca253a 100644 --- a/app/controllers/admin/contacts_controller.rb +++ b/app/controllers/admin/contacts_controller.rb @@ -8,9 +8,9 @@ class Admin::ContactsController < ApplicationController @contacts = Contact.order("created_at DESC") if params[:status] - @contacts = @contacts.where(:status => params[:status]) + @contacts = @contacts.where(:contact_status => params[:status]) else - @contacts = @contacts.where("archived IS NULL or archived = 0") + @contacts = @contacts.where(:contact_status => "En cours") end end diff --git a/app/views/admin/contacts/index.html.haml b/app/views/admin/contacts/index.html.haml index 69af419..bbcad5c 100644 --- a/app/views/admin/contacts/index.html.haml +++ b/app/views/admin/contacts/index.html.haml @@ -6,7 +6,7 @@ %p -["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 %td %td + %td %td Date %td