title: Rails Confirm Delete Popup
body: <p>I have a slight twist on the <code>Are you sure you want to delete this?</code> confirm popup.</p>
  
  <p><code>ruby-2.3.7</code>
  <code>Rails 4.2.11.1</code></p>
  
  <p>I also have the <code>jquery-rails</code> gem.</p>
  
  <p>When a certain link is clicked, I need to delete only about four fields in a record, not the entire record. That is working, but what I'd like to do is use a confirm pop up window when the link is clicked:  <code>Are you sure...?</code></p>
  
  <p>When the link is clicked I send the user to a <code>delete_interview_results</code> action in the controller, not a <code>destroy</code> or <code>delete</code> action.</p>
  
  <p>I can create a view, redirect users there to have them confirm, but that doesn't seem like the best UI experience.</p>
  
  <p>View:</p>
  
  <pre><code>&lt;%= link_to 'Delete Interview Results',
               delete_interview_results_manage_applicant_path(@applicant), 
               class: 'btn',
               confirm: "Are you sure?" %&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>def delete_interview_results
      @applicant = Applicant.find(params[:id])
      redirect_to edit_manage_applicant_path(@applicant), notice: "You just deleted the interview results for #{@applicant.full_name}."
  end
  </code></pre>
  
  <p>Routes:</p>
  
  <pre><code>resources :applicants, only: [ :edit, :update ] do
    ...
    get :delete_interview_results
    ...
  end
  </code></pre>
  
  <p>I do not see any confirm popup window.  I thought having the <code>jquery-rails</code> gem did this.</p>
  
  <p>When I add a <code>method: :delete</code> to this I get an error: </p>
  
  <p><code>No route matches [DELETE] "/manage/applicants/139289/delete_interview_results"</code></p>
  
  <p>Hopefully, I'm just missing a small piece.  I figure there has to be a way to do this.</p>
  
  <p>Thanks for any tips n tricks.</p>