ポップアップを作成する link_to があります。一部のページでは機能しますが、他のページでクリックすると間違った URI に移動します。アプリのアーキテクチャに問題がありますか? すべてのリンクをルーティングしたい
http://localhost:3000/microposts/361/into_it.
SHARED/_feed_item.html.erb---このコード行は適切にルーティングされます:
<%= link_to "#{feed_item.votes_for} Into it!", into_it_micropost_path(feed_item.id), :onclick => "javascript:window.open('microposts/#{feed_item.id}/into_it','popup','width=350,height=300,top=315,left=200');", id: "feeditemlikes_#{feed_item.id}", remote: true %>
USERS/_vote_feed_item.html.erb--- いいねのページでは、
http://localhost:3000/users/1/microposts/361/into_it
<%= link_to "#{vote_feed_item.votes_for} Into it!", into_it_micropost_path(vote_feed_item.id), :onclick => "javascript:window.open('microposts/#{vote_feed_item.id}/into_it','popup','width=350,height=300,top=315,left=200');", id: "feeditemlikes_#{vote_feed_item.id}", remote: true %>
MICROPOSTS/_micropost.html.erb---プロフィールページでのルーティング先
http://localhost:3000/users/microposts/361/into_it
<%= link_to "#{micropost.votes_for} Into it!", into_it_micropost_path(micropost.id), :onclick => "javascript:window.open('microposts/#{micropost.id}/into_it','popup','width=350,height=300,top=315,left=200');", id: "feeditemlikes_#{micropost.id}", remote: true %>
実際には、javascript ポップアップ コードに問題があるようですが、何かヒントはありますか?