From 52dd0d13e3f7d8b59b6922d342ecf0127b78d471 Mon Sep 17 00:00:00 2001 From: Rishi Jain Date: Fri, 22 Jun 2012 20:04:39 +0530 Subject: [PATCH] fixed the count of users --- app/views/ideas/_idea.html.haml | 2 +- app/views/ideas/participate.js.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/ideas/_idea.html.haml b/app/views/ideas/_idea.html.haml index d39c996..0d3b9cb 100644 --- a/app/views/ideas/_idea.html.haml +++ b/app/views/ideas/_idea.html.haml @@ -16,7 +16,7 @@ .floatLeft %i.icon-user> =# pluralize(idea.users.count, "participant") - = idea.users.count + %span{:id => "idea_count_#{idea.id}"} #{idea.users.count} .floatRight = tweet_button :via => "punerb",:count=> "none", :url => idea_url(idea), :text => "This is an interesting idea! Help out " diff --git a/app/views/ideas/participate.js.haml b/app/views/ideas/participate.js.haml index 2dba9d2..4a9a33a 100644 --- a/app/views/ideas/participate.js.haml +++ b/app/views/ideas/participate.js.haml @@ -1,4 +1,4 @@ -$('#idea-#{@idea.id} .detail span:last').html(" #{pluralize(@idea.users.count, 'participant')}") +$('#idea_count_#{@idea.id}').text("#{@idea.users.count}") - if @participant $('#idea-#{@idea.id} a.participate.btn').text('Participate') $('#idea-#{@idea.id} a h2 i').removeClass('favorite')