Giter Site home page Giter Site logo

Comments (6)

stevenh512 avatar stevenh512 commented on September 28, 2024

It probably should include instructions, but it's pretty easy. Just drop the rails.js and a copy of jquery in your public/javascripts directory (after deleting all the prototype stuff if it exists), then edit your config/application.rb to enable it, you'll be looking for a line like this..

# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)

Just uncomment that and change the filenames to match your javascript files (without the. .js).

An even easier way is to just install the jquery-rails gem and run rails generate jquery:install (or rails generate jquery:install --ui if you also want jquery-ui). The gem downloads everything you need, puts it in public/javascripts and handles the configuration for you automagically.

from jquery-ujs.

sethladd avatar sethladd commented on September 28, 2024

Thanks! That DEFINITELY needs to be in the README :)

from jquery-ujs.

stevestmartin avatar stevestmartin commented on September 28, 2024

committed in 17e4a9f

from jquery-ujs.

sethladd avatar sethladd commented on September 28, 2024

awesome, thanks!!

from jquery-ujs.

smcveigh avatar smcveigh commented on September 28, 2024

With the jquery-rails gem installed, when I run

rails generate jquery:install
I just get the rails new help info. Has this syntax changed in Rails 3? I tried using the rails new command as well, but that didn't work.

Obviously I can manually install, but just wanted to make use of the gem if possible.

from jquery-ujs.

smcveigh avatar smcveigh commented on September 28, 2024

Don't worry... just me being thick. I was running the command from the folder above the rails app folder. Works a treat now :-)

from jquery-ujs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.