How do I switch JavaScript libraries in Rails 3 -


I did not leave the prototype after starting my new project and I want to go to JQuery. What is the best way to switch libraries?

you prototype / script and rail JS libraries can be removed. Then copy jquery and you include javascript directory and them in your layout.

I recommend checking the plugin. It provides generator for common tasks like this. In the Jquery case you can just run the Rail G.Jquery: install generator and The files will be copied to you and JAVASCRIPT_DEFAULT_SOURCES in a launcher so that javascript_include_tag: defaults still works.


Comments