% all_replies = Message.where("root_id = #{activity.id}").reorder("created_on desc") %> <% count = all_replies.count %> <% no_children_comments = get_no_children_comments all_replies %> <%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %> <% if count > 0 %>