Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master
Failed to load latest commit information.
lib
vendor/assets/javascripts
.gitignore initial commit
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE
README.md replace can.js v1.1.2 with can.js 2.0.0, resolves issue #2
Rakefile initial commit
canjs-rails.gemspec updated to canjs 1.1.2

README.md

canjs-rails

CanJS for Rails!

This gem provides:

  • can.js 2.0.0 for jQuery (including all plugins)

This gem requires the asset pipeline, so it should work with Rails 3.1 or later. The version of CanJS included with this gem (can.jquery) requires jQuery, conveniently Rails 3.1 and later includes jquery-rails by default, so you won't need to explicitly install jQuery. However, if you aren't using jquery-rails make sure you install jQuery and require it before can.jquery in your app/assets/javascripts/application.js.

Installation

Add the canjs-rails gem to your Gemfile.

gem "canjs-rails"

And run bundle install.

Rails 3.1 or greater (with asset pipeline enabled)

To make the core CanJS library available add these lines to app/assets/javascripts/application.js:

//= require can.jquery

You're done!

Acknowledgements

Many thanks are due to the jquery-rails project as it was used as the basis for this gem.

Copyright Craig Wickesser, released under the MIT License.

Something went wrong with that request. Please try again.