App::Application.routes => App::Application.routes.draw
This commit is contained in:
parent
00a7255a88
commit
0a87d05430
@ -327,7 +327,7 @@ module Rails
|
|||||||
r.to_route_code
|
r.to_route_code
|
||||||
end.join("\n")
|
end.join("\n")
|
||||||
|
|
||||||
"#{app_name.classify}::Application.routes do\n#{@new_code}\nend\n"
|
"#{app_name.classify}::Application.routes.draw do\n#{@new_code}\nend\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -40,7 +40,7 @@ class RoutesUpgraderTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
"
|
"
|
||||||
|
|
||||||
new_routes_code = "MyApplication::Application.routes do
|
new_routes_code = "MyApplication::Application.routes.draw do
|
||||||
match '/home' => 'home#index'
|
match '/home' => 'home#index'
|
||||||
match '/login' => 'sessions#new', :as => :login
|
match '/login' => 'sessions#new', :as => :login
|
||||||
resources :hats
|
resources :hats
|
||||||
@ -101,7 +101,7 @@ end
|
|||||||
end
|
end
|
||||||
"
|
"
|
||||||
|
|
||||||
new_routes_code = "MyApplication::Application.routes do
|
new_routes_code = "MyApplication::Application.routes.draw do
|
||||||
match '/' => 'home#index'
|
match '/' => 'home#index'
|
||||||
end
|
end
|
||||||
"
|
"
|
||||||
@ -122,7 +122,7 @@ end
|
|||||||
end
|
end
|
||||||
"
|
"
|
||||||
|
|
||||||
new_routes_code = "MyApplication::Application.routes do
|
new_routes_code = "MyApplication::Application.routes.draw do
|
||||||
match '/:controller(/:action(/:id))'
|
match '/:controller(/:action(/:id))'
|
||||||
end
|
end
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user