1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unused action arg for generate_routing_code

This commit is contained in:
Ryuta Kamizono 2017-08-15 12:09:31 +09:00
parent 3fc47f4d82
commit 2917f0041e

View file

@ -16,7 +16,7 @@ module Rails
def add_routes def add_routes
return if options[:skip_routes] return if options[:skip_routes]
route generate_routing_code(actions) route generate_routing_code
end end
hook_for :template_engine, :test_framework, :helper, :assets hook_for :template_engine, :test_framework, :helper, :assets
@ -32,7 +32,7 @@ module Rails
# get 'baz/show' # get 'baz/show'
# end # end
# end # end
def generate_routing_code(action) def generate_routing_code
depth = 0 depth = 0
lines = [] lines = []
@ -46,6 +46,7 @@ module Rails
# Create route # Create route
# get 'baz/index' # get 'baz/index'
# get 'baz/show'
actions.each do |action| actions.each do |action|
lines << indent(%{get '#{file_name}/#{action}'\n}, depth * 2) lines << indent(%{get '#{file_name}/#{action}'\n}, depth * 2)
end end