title: problems with form_tag for controller action with members-get route
body: <p>I'm making a form_tag panel that contains information (checkboxes) specific to a controller action. This action is set up in "routes.rb" as follows:</p>
  
  <pre><code>resources :students do
    collection do
      get :send_student_report_pdf
    end   
  end
  </code></pre>
  
  <p>This setup <strong>works</strong> perfectly when I call the action from a link_to:</p>
  
  <pre><code>&lt;%= link_to "Download PDF Report", :action =&gt; 'send_student_report_pdf', :controller =&gt; 'students'%&gt;
  </code></pre>
  
  <p>However when I used it in a <code>form_tag</code>, it keeps giving me this error:</p>
  
  <pre><code>Routing Error
  No route matches "/students/send_student_report_pdf"
  </code></pre>
  
  <p>The <code>form_tag</code> code I have is here:</p>
  
  <pre><code>&lt;%= form_tag :controller =&gt; 'students', :action =&gt; 'send_student_report_pdf', :method =&gt; 'get' do %&gt;
    &lt;%= label_tag "Include columns" %&gt; &lt;br&gt;
    &lt;%= check_box_tag "first_name", params[:first_name], checked = true %&gt; &lt;%= label_tag "First Name" %&gt;&lt;br&gt;  
    &lt;%= submit_tag "Download PDF Report", :action =&gt; 'send_student_report_pdf', :controller =&gt; 'students'%&gt;  
  &lt;% end %&gt;
  </code></pre>
  
  <p>I have tried giving it the url, path like:</p>
  
  <pre><code>&lt;%= form_tag send_student_report_pdf_students_path, :method =&gt; 'get' do %&gt;
  </code></pre>
  
  <p>But it has been consistently giving me the same Route error (as if the action doesn't exist at all in routes.rb, even though it works perfectly using <code>link_to</code> instead of <code>form_tag submit</code></p>
  
  <p>Here is the code for the action in the controller, it basically sends back a file.</p>
  
  <pre><code>def send_student_report_pdf
    @students = search_sort_and_paginate
    puts "params[:first_name] = ", params[:first_namea]
    send_data(generate_pdf_report(@students), :filename =&gt; "report.pdf", :type =&gt; 'application/pdf') 
  end
  </code></pre>
  
  <p>If you see that I'm missing something here, please help me.</p>
  
  <p>Thank you very much, </p>
  
  <p>Regards,    </p>