Early this morning I was working on the http://thealpinetrainingcenter.com website, something I love to do because it is used by real users.
One of the things I do on this Rails based website is allow the owner, my friend Connie, to administer pages with a secret key. This is an easy way for her to change content on the website. I needed a way for her to delete records with a link but I wanted to prompt for the secret key. The `link_to` helper function in Rails has a confirm param which will confirm before sending the link but I needed a prompt that could take an input and add it to the URL params when the link is submitted. I found exactly that with this handy plugin: http://github.com/bhedana/link_to_with_prompt. Here is an example of using it:
<td><%= link_to 'Delete', athlete, :prompt => 'Please enter the secret key', :method => :delete %></td>
Btw, the param it adds to the link is params[:prompt_reply].