johnny
johnny

Reputation: 19735

how do you install jquery in Ruby on Rails?

Is it just a matter of installing the jquery.jq file in the javascript folder and linking to it?

Upvotes: 1

Views: 927

Answers (2)

nfm
nfm

Reputation: 20677

What version of Rails are you running?

For Rails 2.x, you will probably also want to install the jrails plugin to provide jquery versions of all the javascript helpers like link_to_remote and periodically_call_remote.

For Rails 3.0, you should download the jquery-ujs version of rails.js from github to achieve the same functionality.

Otherwise, you'll have to write all your AJAX manually if you just remove prototype and scriptaculous and drop in jquery.js.

Upvotes: 6

Toby Hede
Toby Hede

Reputation: 37133

Yes, delete the default js files and place your own and then include it in your layouts.

Upvotes: 3

Related Questions