diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-09-05 17:55:45 -0700 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-09-05 17:55:45 -0700 |
commit | b1bc95bfa55319288df6c0257adf6dcbeccb0a06 (patch) | |
tree | 00772054d079618118bfc1cb667687c64f679472 | |
parent | dc8a7595522a49403f1d1f0d62ae8dc2807e25df (diff) | |
download | rails-b1bc95bfa55319288df6c0257adf6dcbeccb0a06.tar.gz rails-b1bc95bfa55319288df6c0257adf6dcbeccb0a06.tar.bz2 rails-b1bc95bfa55319288df6c0257adf6dcbeccb0a06.zip |
Use the released jquery-rails gem
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -9,7 +9,7 @@ gem 'mocha', '~> 0.14', require: false gem 'rack-cache', '~> 1.2' # TODO: Release this gem -gem 'jquery-rails', github: 'rails/jquery-rails', branch: 'master' +gem 'jquery-rails', '~> 4.0.0.beta1' gem 'coffee-rails', '~> 4.0.0' # TODO: Release this gem gem 'rails-html-sanitizer', github: 'rails/rails-html-sanitizer' diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 841d39dad6..143c39eff2 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -281,8 +281,14 @@ module Rails [] else gems = [coffee_gemfile_entry, javascript_runtime_gemfile_entry] - gems << GemfileEntry.github("#{options[:javascript]}-rails", "rails/#{options[:javascript]}-rails", - "Use #{options[:javascript]} as the JavaScript library") + + if options[:javascript] == 'jquery' + gems << GemfileEntry.version('jquery-rails', '~> 4.0.0.beta1', + 'Use jQuery as the JavaScript library') + else + gems << GemfileEntry.version("#{options[:javascript]}-rails", nil, + "Use #{options[:javascript]} as the JavaScript library") + end gems << GemfileEntry.version("turbolinks", nil, "Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks") |