rails/jquery-rails — pull request #77 by fullbridge-batkins (2012-09-28 21:37:32+00:00)
Title: Make minified versions of scripts included in production mode when asset pipeline is disabled

The README file says:

> Rails 3.0 (or greater with asset pipeline disabled)
> ...
> While this gem contains the minified and un-minified versions of jQuery and jQuery UI, only the minified versions are included in :defaults.

This is not actually true anymore for the gem, at least not when this gem is used on an app running with Rails 3.0 (or greater with asset pipeline disabled). This functionality was removed with [this commit](https://github.com/rails/jquery-rails/commit/84a3670769987cd20f5c6b19171cdc92905c7d43) (although I'm not entirely sure why).

I don't see a downside to re-enabling this functionality, as I know there are many rails developers out there who have yet to migrate their existing apps to use the asset pipeline. Here is code that will re-enable functionality so that the minified versions of the scripts get added into the `:defaults` group when a Rails app is run in `production` or `test` mode (along with a modification to the documentation to inform the user of exactly how it works).

This functionality also allows Rails `3.0.x` apps to use the gem properly, since these applications function just like Rails >= `3.1` with the asset pipeline disabled.