jquery-ui-rails-engine
Unlike jquery-ui-rails, this gem only serves javascript. It also add CDN support similar to jquery-rails-cdn.
History
This gem was a fork of jquery-rails-cdn to support jquery-ui from jquery-rails. But since 3.0, jquery-rails no longer includes jQuery UI. Thus, the fork is not needed anymore. Now, this gem will provide javascript part of jquery-ui locally and through CDN. If you need stylesheet from jQuery UI, you might use jquery-ui-rails-cdn.
Version
jQuery UI: 1.10.3
Rails 3.1 or later
Include Gemfile,
gem 'jquery-ui-rails-engine'
Add javascripts into application.js
//= require jquery/jquery-ui
CDN
In the application layout, add
= jquery_ui_include_tag :default
then remove corresponding lines in application.js.
Options
Set :compressed to use minimized library locally like this:
= jquery_ui_include_tag :default, :compressed => true
Set :local_copy true to use local copy when CDN is not available.
Remember to add assets name in confign/environments/production.rb:
config.assets.precompile += %w( jquery/jquery-ui.min.js)
License
MIT License