Tuesday, September 13, 2011

How to use jQuery instead of Prototype in Rails 3

Here i'm gonna explain you how to use jquery instead of prototype in rails 3.

i have done this without using any gem like "jquery-rails".

first step: download latest jquery from http://jquery.com/ website.
second step: place it in public/javascripts folder.
third step: edit the application.rb file which is in config folder
                    uncomment the line
" config.action_view.javascript_expansions[:defaults] = %w(jquery rails) "


thats it.

was this helpfull please let me know if you have queries.

please post comments and let me know some feedback.

3 comments:

  1. How to use Jquery in Rails 2.3.5...?
    It is not supported by application.js...please help me out..

    ReplyDelete
  2. Sure i will post the answer soon....

    ReplyDelete
  3. how soon is your soon? :)

    ReplyDelete