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

Merge pull request #30260 from kamipo/remove_unused_action_arg

Remove unused `action` arg for `generate_routing_code`
This commit is contained in:
Rafael França 2017-08-16 14:39:27 -04:00 committed by GitHub
commit e183dc195a

View file

@ -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