title: Rails redirect to previous page (back) after delete
body: <p>Is there a way to include a redirect in a link_to?  I want to just refresh the current page after a delete.  But, you can delete the same record from multiple views in the app.</p>
  
  <p>This is the link_to:</p>
  
  <pre><code>&lt;%= link_to 'Delete', expense, confirm: 'Are you sure?', method: :delete, :class =&gt; 'btn btn-mini btn-danger' %&gt;
  </code></pre>
  
  <p>If not, does it make sense to save the current_url in flash[:fromurl] then put that in the Controller destroy section like this:</p>
  
  <pre><code>   respond_to do |format|
       format.html { redirect_to flash[:fromurl] }
       format.json { head :no_content }
     end
  </code></pre>
  
  <p>Thanks for the help!</p>