How to prevent loading mercury.js on all pages?
wingleungchoi opened this issue · 0 comments
wingleungchoi commented
Hi, i followed the http://railscasts.com/episodes/296-mercury-editor?view=comments&_=1428483497495.
I know to use "saveUrl" rather than "saveURL", turn off turbolink and data-mercury="full". It works.
However, i am thinking how to prevent loading mercury.js on all pages.
Do mercury.js have to be in app/assets/javascripts?
I tried to store it another path and use javscript_include_tag to require it on particular page. It seems it doesn't change the saveUrl and redirect window.location.
Remove //= require_tree . in application.js is the only way to prevent load it on all pages?