aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-08-16 14:39:27 -0400
committerGitHub <noreply@github.com>2017-08-16 14:39:27 -0400
commite183dc195a965371b1edc3ea18c54910758c32e3 (patch)
treee5f86c13593c7d94e891a2d174891c93c87a9829
parentd2f493c7ed7a95f48730aecdcfbcc7bbee30921b (diff)
parent2917f0041e23be7a827d54927b9b9bc88b4817e6 (diff)
downloadrails-e183dc195a965371b1edc3ea18c54910758c32e3.tar.gz
rails-e183dc195a965371b1edc3ea18c54910758c32e3.tar.bz2
rails-e183dc195a965371b1edc3ea18c54910758c32e3.zip
Merge pull request #30260 from kamipo/remove_unused_action_arg
Remove unused `action` arg for `generate_routing_code`
-rw-r--r--railties/lib/rails/generators/rails/controller/controller_generator.rb5
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