From b1bc95bfa55319288df6c0257adf6dcbeccb0a06 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 5 Sep 2014 17:55:45 -0700 Subject: Use the released jquery-rails gem --- Gemfile | 2 +- railties/lib/rails/generators/app_base.rb | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 19053b9b67..cb159296fa 100644 --- a/Gemfile +++ b/Gemfile @@ -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") -- cgit v1.2.3