I am creating a web app that uses Rails built-in helper functions to add ajax functionality to the site. I do not want the user to be able to use the app without JS as it will not function properly.
I need to be able to prevent this. How can I go about stopping the user from loading any of my pages without JS?
I have tried to use a tag in my layout. This detects the absence of JS but still renders the views. Putting the script tag around the yield prevents any view from being rendered.
Any ideas on how to do this?
javascriptdisabled.html
file in thepublic/
directory that had the same styling as the500.html
error page. Then used<meta http-equiv="refresh" content="2;url=#{ root_url + "javascriptdisabled.html" }">
to dynamically generate the URL based on what environment you are in. – Floret