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
|
||||
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
|
||||
|
||||
private
|
||||
|
@ -40,7 +40,7 @@ class RoutesUpgraderTest < ActiveSupport::TestCase
|
||||
end
|
||||
"
|
||||
|
||||
new_routes_code = "MyApplication::Application.routes do
|
||||
new_routes_code = "MyApplication::Application.routes.draw do
|
||||
match '/home' => 'home#index'
|
||||
match '/login' => 'sessions#new', :as => :login
|
||||
resources :hats
|
||||
@ -101,7 +101,7 @@ end
|
||||
end
|
||||
"
|
||||
|
||||
new_routes_code = "MyApplication::Application.routes do
|
||||
new_routes_code = "MyApplication::Application.routes.draw do
|
||||
match '/' => 'home#index'
|
||||
end
|
||||
"
|
||||
@ -122,7 +122,7 @@ end
|
||||
end
|
||||
"
|
||||
|
||||
new_routes_code = "MyApplication::Application.routes do
|
||||
new_routes_code = "MyApplication::Application.routes.draw do
|
||||
match '/:controller(/:action(/:id))'
|
||||
end
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user