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:
commit
e183dc195a
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue