aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/app_base.rb
diff options
context:
space:
mode:
authorclaudiob <claudiob@inventati.org>2017-03-23 08:07:04 -0700
committerclaudiob <claudiob@inventati.org>2017-03-23 08:07:04 -0700
commit42198064c35ff3b701496309f90df2abc229efbe (patch)
tree8a0ef8b298f25c7e4ffd82107f5a22c146edac38 /railties/lib/rails/generators/app_base.rb
parent307fd7407f868095e107bd9af66b949b0ee40c20 (diff)
downloadrails-42198064c35ff3b701496309f90df2abc229efbe.tar.gz
rails-42198064c35ff3b701496309f90df2abc229efbe.tar.bz2
rails-42198064c35ff3b701496309f90df2abc229efbe.zip
Remove -j (--javascript) option from `rails new`
The "-j" option was added 5 years ago (https://github.com/rails/rails/commit/d9c39c3a) when we wanted to support prototype-rails and jquery-rails. Prototype is not as popular and jQuery is not a requirement anymore. Still the "-j" option can be used to install *any* gem that ends in "-rails". This "might" open security issues and does not bring great benefits anymore. If you know which "-rails"-ending gem you want to install, you can manually add it to the Gemfile just like any other gem.
Diffstat (limited to 'railties/lib/rails/generators/app_base.rb')
-rw-r--r--railties/lib/rails/generators/app_base.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index fbb6b5039c..56cd494955 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -31,9 +31,6 @@ module Rails
class_option :database, type: :string, aliases: "-d", default: "sqlite3",
desc: "Preconfigure for selected database (options: #{DATABASES.join('/')})"
- class_option :javascript, type: :string, aliases: "-j",
- desc: "Preconfigure for selected JavaScript library"
-
class_option :webpack, type: :string, default: nil,
desc: "Preconfigure for app-like JavaScript with Webpack (options: #{WEBPACKS.join('/')})"
@@ -342,11 +339,6 @@ module Rails
gems = [javascript_runtime_gemfile_entry]
gems << coffee_gemfile_entry unless options[:skip_coffee]
- if options[:javascript]
- gems << GemfileEntry.version("#{options[:javascript]}-rails", nil,
- "Use #{options[:javascript]} as the JavaScript library")
- end
-
unless options[:skip_turbolinks]
gems << GemfileEntry.version("turbolinks", "~> 5",
"Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks")