title: Link_to remote => true causing strange routing problems, Rails 3
body: <p>I am having some problems with link_to remote sending a post to another controller... The result are not quite what I expect..</p>
  
  <p>I have this in node_content.html.erb:</p>
  
  <pre><code>&lt;% @node.videos.each do |vid| %&gt;
   &lt;div id="vid_vid"&gt;&lt;%= link_to image_tag("http://img.youtube.com/vi/#{vid.content}/1.jpg"),  :controller =&gt; 'videos', :action =&gt; "iframize", :video_id =&gt; vid.id,  :method =&gt; :post,  :remote =&gt; true %&gt;&lt;/div&gt;
  
   &lt;% end %&gt;
  </code></pre>
  
  <p>And I have this in videos_controller:</p>
  
  <pre><code>  def iframize
     @video = Video.find(params[:video_id])
     respond_to do |format|
       format.js
     end
   end
  </code></pre>
  
  <p>And this in routes:</p>
  
  <pre><code> resource :videos do
    collection do
     post 'iframize'
    end
  end
  </code></pre>
  
  <p>Problem is that when I click the link, it takes me to </p>
  
  <pre><code>http://localhost:3000/videos/iframize?method=post&amp;video_id=20
  </code></pre>
  
  <p>and I get </p>
  
  <pre><code>Couldn't find Video with id=iframize
  </code></pre>
  
  <p>I looked through tens of various examples and they seem to recommend the above, but it does not work.. What am I doing wrong?</p>
  
  <p>Any input greatly appreciated!</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>I tried this approach jquery function and it kinda worked (only for the first video in the loop of course):</p>
  
  <pre><code>&lt;% @node.videos.each do |vid| %&gt;
    &lt;%=  image_tag("http://img.youtube.com/vi/#{vid.content}/1.jpg", :id  =&gt; 'img_div') %&gt;
  &lt;div id="vid_vid"&gt; &lt;%= vid.id %&gt;&lt;/div&gt;
  &lt;% end %&gt;
  
  
  
  $('#img_div').on({
    'click': function() {
     var vid_id = document.getElementById("vid_vid").innerHTML;
     $.post("/videos/iframize/", {video_id: vid_id}); 
    }
   });
  </code></pre>