title: Rails redirect to index page after delete
body: <p>I need to place delete link at the show page of the object. This show page is to rendered at two different controllers. In which I need to redirect to the index page from which the request came from. The URL would be<br>
  localhost:3000/users (index page) which will have link to books (show page) that URL will be local host:3000/books/I'd. And at another controller index page local host:3000/books and that too have link to books show page which have delete link in it. I need to redirect to the index page from which the request came from. Any help</p>
  
  <p>Edit:
  How to redirect to previous page in Ruby On Rails? (Question already there)
  We can get the request URL at edit action. But here the delete action will be at common show page</p>