diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-01-23 11:08:06 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-01-23 11:19:11 +0900 |
commit | 7816bfff21876e663aab757dc0c04c442ea05827 (patch) | |
tree | 4b466fbda9d98c81131b3a314881b5bb97a7caf9 /railties | |
parent | fb5bd3c6f2f29c3ed370e82db0d3de52a97a0648 (diff) | |
download | rails-7816bfff21876e663aab757dc0c04c442ea05827.tar.gz rails-7816bfff21876e663aab757dc0c04c442ea05827.tar.bz2 rails-7816bfff21876e663aab757dc0c04c442ea05827.zip |
remove unreachable code
`app_path` is a required argument. Therefore, if `app_path` is not
specified, it becomes an error in thor's option parsing, does not reach
this check.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index bdeebbb8b5..744e51cd21 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -187,10 +187,6 @@ module Rails def initialize(*args) super - unless app_path - raise Error, "Application name should be provided in arguments. For details run: rails --help" - end - if !options[:skip_active_record] && !DATABASES.include?(options[:database]) raise Error, "Invalid value for --database option. Supported for preconfiguration are: #{DATABASES.join(", ")}." end diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 22604d4d9d..49259f32c8 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -195,10 +195,6 @@ task default: :test def initialize(*args) @dummy_path = nil super - - unless plugin_path - raise Error, "Plugin name should be provided in arguments. For details run: rails plugin new --help" - end end public_task :set_default_accessors! |