2013-05-03 124 views
0

我正在从ruby 2.3.xx更新应用程序到3.2,我每次都在做一步。rails 3中的默认路径3

应用程序使用从赖斯2.3.xx的缺省路由的描述如下:

# Install the default route as the lowest priority. 
map.connect ':controller/:action/:id.:format' 
map.connect ':controller/:action/:id' 
map.connect ':controller/:action.:format' 
map.connect ':controller.:format' 

当然,你不希望有这样的路线对你的Rails 3应用程序,但由于更新过程中,我想要做小步骤。所以第一步就是让这些路线工作,然后消除它。

所以,问题:如何在轨道3中写这条路线?

回答

1

从Rails的3 config/routes.rb

# This is a legacy wild controller route that's not recommended for RESTful applications. 
# Note: This route will make all actions in every controller accessible via GET requests. 
# match ':controller(/:action(/:id))(.:format)' 
+0

duhh。谢谢。 – fotanus 2013-05-03 20:33:41

+0

当然,它有最少的时间来接受答案。 – fotanus 2013-05-03 20:40:30

+0

意外删除了我的评论,但正确的是您的时间限制为15分钟:http://meta.stackexchange.com/questions/50697/time-limit-on-accepting-an-answer – zeantsoi 2013-05-03 20:52:15