I'm developing a web app in Ruby-On-Rails. It heavily uses JavaScript. The problem is, when user clicks on a link which is suppose to make JS call and if the JavaScript is disabled or fails to load completely due to slow internet connection; it makes HTML request. This gives me error "Missing template". I don't want to redirect user to any HTML page template.
How can I disable link when JavaScript is turned off? or force to make only JS call? I want to implement something similar like Twitter.
Any help highly appreciated. Thanks :)