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