jquery - Rails 4 ajax acts as votable with turbo links vote counts not updating -
i'm able click on link once, , count update, doesn't update on clicks after that, nor update database (looking @ console). index.html.haml .votes - if current_user.liked? skit = link_to unlike_skit_path(skit), method: :get, remote: true, class: "unlike-post" .upvote %span.upvote-link %i.fa.fa-caret-up .vote-count= skit.votes_for.size - else = link_to like_skit_path(skit), method: :get, remote: true, class: "like-post" .upvote %span.upvote-link %i.fa.fa-caret-up .vote-count= skit.votes_for.size routes.rb resources :skits resources :challenges member "like", to: "skits#like" "unlike", to: "skits#unlike" end end unlike.js.erb $('.unlike-post').bind('ajax:success', function(){ $(this).find('.vote-count').html('<%= escape_javascript @skit.votes_for.size.to_s %>'); }); like.js.e...