From 0434599bd0b8cb899e3874b9edd825e6223ace8b Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Thu, 19 Feb 2015 20:22:07 +0100 Subject: [PATCH] Contacts page: 'Start a conversation' button should depend on number of contacts in aspect --- app/views/contacts/_header.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/contacts/_header.html.haml b/app/views/contacts/_header.html.haml index 7640329c7..6d879c1ab 100644 --- a/app/views/contacts/_header.html.haml +++ b/app/views/contacts/_header.html.haml @@ -1,8 +1,8 @@ .header - if @aspect #aspect_controls.pull-right - - if @contacts_size > 0 && @contacts_size < 20 - = start_a_conversation_link(@aspect, @contacts_size) + - if @aspect.contacts.size > 0 && @aspect.contacts.size < 20 + = start_a_conversation_link(@aspect, @aspect.contacts.size) = link_to aspect_toggle_contact_visibility_path(@aspect), id: "contacts_visibility_toggle", class: "contacts_button", method: :put, remote: true do -if @aspect.contacts_visible?