From 9221e9ae9f38ba941b7d8e059467c3a3786dc7bf Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 18 Mar 2013 15:20:07 -0700 Subject: [PATCH] fixes #952 --- app/views/favorites/create.js.erb | 1 + app/views/favorites/destroy.js.erb | 1 + app/views/posts/partials/show/_information.html.erb | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/favorites/create.js.erb b/app/views/favorites/create.js.erb index 6f7fcaf7f..505a7461f 100644 --- a/app/views/favorites/create.js.erb +++ b/app/views/favorites/create.js.erb @@ -4,4 +4,5 @@ $("a#add-to-favorites").hide(); $("a#remove-from-favorites").show(); $("#score-for-post-<%= @post.id %>").html(<%= @post.score %>); + $("#favcount-for-post-<%= @post.id %>").html(<%= @post.fav_count %>); <% end %> diff --git a/app/views/favorites/destroy.js.erb b/app/views/favorites/destroy.js.erb index 3394f959c..0ec951fab 100644 --- a/app/views/favorites/destroy.js.erb +++ b/app/views/favorites/destroy.js.erb @@ -1,3 +1,4 @@ $("a#add-to-favorites").show(); $("a#remove-from-favorites").hide(); $("#score-for-post-<%= @post.id %>").html(<%= @post.score %>); +$("#favcount-for-post-<%= @post.id %>").html(<%= @post.fav_count %>); diff --git a/app/views/posts/partials/show/_information.html.erb b/app/views/posts/partials/show/_information.html.erb index 1d0dfa1ce..5c0c01d4f 100644 --- a/app/views/posts/partials/show/_information.html.erb +++ b/app/views/posts/partials/show/_information.html.erb @@ -14,7 +14,7 @@
  • Source: <%= post_source_tag(post) %>
  • Rating: <%= post.pretty_rating %>
  • Score: <%= post.score %> <% if CurrentUser.is_privileged? %>(vote <%= link_to "up", post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %>/<%= link_to "down", post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %>)<% end %>
  • -
  • Favorites: <%= post.fav_count %>
  • +
  • Favorites: <%= post.fav_count %>
  • Status: <% if post.is_pending? %>