That doesn't quite work. When I use <%= @review.votes_count %> in the
create.js.erb file it updates the counter on the first review,
regardless of whether the vote was placed on the first review or not.

I thought maybe if I loop through the reviews again the create.js.erb
file it might work.

<% do |review| %>
$("#votes").html("<%= review.votes_count %>")
<% end %>

This did not work either.

Posted via

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 6 | next ›
Discussion Overview
grouprubyonrails-talk @
postedOct 14, '11 at 12:31a
activeOct 16, '11 at 2:27a

2 users in discussion

Sean Six: 4 posts Tim Shaffer: 2 posts



site design / logo © 2022 Grokbase