Using jQuery plugins in Rails 3

☆樱花仙子☆ 提交于 2019-12-04 03:04:59

Normal practice is to download a minified version of the plugin you'd like to use and save it in the public/javascripts directory.

rails install is for Rails plugins, not jQuery plugins.

In current rails version the directory would be

/vendor/assets/javascripts

If you are insistent on using rails install you could write a rake or thor task to copy the files for you.

You could also try a symlink between the public/javascripts directory and the download directory so the stylesheet tag can just access it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!