From f6ebb4ee41d4e19e6ea06df0d66c4297f3238c71 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sun, 8 Jun 2014 18:58:35 -0700 Subject: [PATCH] fix for logged out display of site --- views/site.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/views/site.erb b/views/site.erb index b98cd4ef..1fd52e87 100644 --- a/views/site.erb +++ b/views/site.erb @@ -19,13 +19,15 @@ <% if current_site == site %> Edit Site <% end %> - <% if current_site != site %> - <% is_following = current_site.is_following?(site) %> - + + <% if current_site && current_site != site %> + <% is_following = current_site.is_following?(site) %> + <%= is_following ? 'Unfollow' : 'Follow' %> <% end %> +