rest - Is there a way to redirect to a specific page after a RESTful delete in Rails? -


Let's say I have a message resource where I have somewhere in the HTML:

  Lt;% = link_to ("Delete", Message,: Title = & gt; 'Delete' ,: Confirmation = & gt; 'Are you sure?',: Method = & gt ;: delete)% & gt;  

Immediately after removing it, it redirects to the page where it lists all the messages, is there a way to redirect to that page that I deleted Specify?

In the Controller:

Remove from def items. (Param [: ID]). Redirect_to: action = & gt; Use the "index" and

to redirect to the last URL:

  redirect_to: back  

< / P>

If you can read API docs, they are very useful, once you hang them.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -