diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-08-15 12:09:31 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-08-15 12:09:31 +0900 |
commit | 2917f0041e23be7a827d54927b9b9bc88b4817e6 (patch) | |
tree | cf2dae58f3d6f9004c6a87575df9021c72ac4a5d /railties/lib/rails/generators | |
parent | 3fc47f4d82175c3f32dab6177685ae24f485c7b1 (diff) | |
download | rails-2917f0041e23be7a827d54927b9b9bc88b4817e6.tar.gz rails-2917f0041e23be7a827d54927b9b9bc88b4817e6.tar.bz2 rails-2917f0041e23be7a827d54927b9b9bc88b4817e6.zip |
Remove unused `action` arg for `generate_routing_code`
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/controller/controller_generator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/controller/controller_generator.rb b/railties/lib/rails/generators/rails/controller/controller_generator.rb index ab0594fc3c..6d45d6e8f8 100644 --- a/railties/lib/rails/generators/rails/controller/controller_generator.rb +++ b/railties/lib/rails/generators/rails/controller/controller_generator.rb @@ -16,7 +16,7 @@ module Rails def add_routes return if options[:skip_routes] - route generate_routing_code(actions) + route generate_routing_code end hook_for :template_engine, :test_framework, :helper, :assets @@ -32,7 +32,7 @@ module Rails # get 'baz/show' # end # end - def generate_routing_code(action) + def generate_routing_code depth = 0 lines = [] @@ -46,6 +46,7 @@ module Rails # Create route # get 'baz/index' + # get 'baz/show' actions.each do |action| lines << indent(%{get '#{file_name}/#{action}'\n}, depth * 2) end |