This link was forwarded to me. It contains a simple solution to a situation that can get very hazardous to your site..
It is very tempting to use link_to in Rails to do something like a delete..
I've used link_to_remote very so often to do an Ajax Delete...
But what if you have crawlers consuming links in your site, this could really kill you!! So the solution here is to use button_to and not link_to
Give it a read... http://blog.moertel.com/articles/2005/05/08/taking-the-unsafe-gets-out-of-rails
It is very tempting to use link_to in Rails to do something like a delete..
I've used link_to_remote very so often to do an Ajax Delete...
But what if you have crawlers consuming links in your site, this could really kill you!! So the solution here is to use button_to and not link_to
Give it a read... http://blog.moertel.com/articles/2005/05/08/taking-the-unsafe-gets-out-of-rails
0 comments:
Post a Comment