From ac694eda8c7e5c80d2ed1f0c23dc240ee58b47a4 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 18 Aug 2010 15:42:06 -0700 Subject: [PATCH] A bunch of dumb checks to make the group index publisher pass tests --- app/views/groups/index.html.haml | 4 +++- app/views/shared/_publisher.haml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml index 4ed9db19e..6d8389727 100644 --- a/app/views/groups/index.html.haml +++ b/app/views/groups/index.html.haml @@ -2,7 +2,9 @@ welcome home, = current_user.profile.first_name -= render "shared/publisher", :group_id => @group.id +- @group.nil? ? group_id = nil : group_id = @group.id + += render "shared/publisher", :group_id => group_id %ul#stream - for post in @posts diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index fe52ac354..710b0d2bc 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -4,7 +4,8 @@ = form_for StatusMessage.new, :remote => true do |f| = f.error_messages - = f.hidden_field :group_id, :value => group_id + -if group_id + = f.hidden_field :group_id, :value => group_id %p %label{:for => "status_message_message"} Message