Have you ever headed to the jQuery UI download
page, selected some components, downloaded a
custom jQuery UI package, and dumped the files in your Rails app? Then you
probably felt as undignified as I did. This is not how we should have to
configure our libraries.
The only alternative right now is the
jquery-rails gem, which (in
addition to packaging jQuery) is nice enough to ship a
file for your convenience. However, this gives you all of jQuery UI’s
components (an extra 51KB gzipped) when you might need only one or two, and it
also does not give you the CSS and image files.
To put an end to this situation, I wrote up the
jquery-ui-rails gem, which
It comes with individual jQuery UI modules, and it resolves dependencies
between the jQuery UI modules through the asset pipeline, so you can
the component(s) you need and things will just work.
Also, the image references in the CSS files now point at images in the asset
pipeline. No more dumping PNGs in your
If you are using jQuery UI in your app right now, please give it a spin, and
let me know if it works for you!
P.P.S. I haven’t tested it, but I see that CodeOfficer has made a
gem (and perhaps there are more helper gems that I don’t know about). See also
jquery ui – Modifying Rails helpers to add HTML
on Stack Overflow. I’m not looking to add helpers to the jquery-ui-rails gem,
since I think it’s best to do one thing well, but if you have used helpers for
jQuery UI (or written your own), please share your experiences so other people
Read more at the source