diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-08-13 23:34:08 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-08-13 23:34:08 +0300 |
commit | 08e894e8e8d7080525f81e2840e7cbf34f012ed6 (patch) | |
tree | 4f882e7dbdda34ae347d107b690d0f5229c8195c /railties/lib | |
parent | 691af789000446cedbe9faf532a991a87c7e254c (diff) | |
download | rails-08e894e8e8d7080525f81e2840e7cbf34f012ed6.tar.gz rails-08e894e8e8d7080525f81e2840e7cbf34f012ed6.tar.bz2 rails-08e894e8e8d7080525f81e2840e7cbf34f012ed6.zip |
Register `--api` option for plugin generator by PASSTHROUGH_OPTIONS constant
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index a40fa78132..89e7b1c04a 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -87,14 +87,13 @@ task default: :test PASSTHROUGH_OPTIONS = [ :skip_active_record, :skip_action_mailer, :skip_javascript, :skip_action_cable, :skip_sprockets, :database, - :javascript, :quiet, :pretend, :force, :skip + :javascript, :api, :quiet, :pretend, :force, :skip ] def generate_test_dummy(force = false) opts = (options || {}).slice(*PASSTHROUGH_OPTIONS) opts[:force] = force opts[:skip_bundle] = true - opts[:api] = options.api? opts[:skip_listen] = true opts[:skip_git] = true opts[:skip_turbolinks] = true |