Currently I am displaying the votes count statically on my page but I would like to find a way to make count update dynamically so that when I click the vote button it doesn't have to refresh the page to change the count.
This is the code in my view for the vote button
_post.html.erb
<%= form_for(@vote, :remote => true) do |f| %>
<%= f.hidden_field "post_id", :value => post.id %>
<%= f.hidden_field "user_id", :value => current_user.id %>
<%= image_submit_tag "arrow.png" %>
<% end %>
This is the code in my view for how I'm rendering the count
_post.html.erb
I am using jquery and I tried to look for a way to update the count but haven't found much information. Thanks for the help I appreciate it.