|
|
1
3
这是可行的,但是你需要去编辑你的所有链接到索引上,这样说
不过,它将保持您的路线名称不变。 (顺便说一下,您的/co与您的regex不匹配,后者需要大写字符) 有趣的是:我们真的需要一个路由器的抽象吗? http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes |
|
|
2
0
I'm afraid this won't work since the structure that maps paths to controllers and actions is setup on start of the rails application, parameter handling happens at request time. 您可以做的是将CuthScript控制器的显示动作中的ID参数与有效状态列表匹配,然后重定向或呈现不同的操作。 希望这有帮助。 |
|
cluster1 · 采取独立的新行动的好处是什么? 1 年前 |
|
|
Robert · 使用JSON或哈希时,将NULL替换为NIL 1 年前 |
|
|
Fred Willmore · Rails控制器不呈现任何模板 2 年前 |
|
|
Diogo Amaral · 实现API请求的正确方式 2 年前 |
|
|
Meknassih · 在控制器方法中分配给模型没有任何作用 2 年前 |
|
|
Michael Ding · Rails上的默认会话到期问题 2 年前 |
|
|
Flávio · 基于另外两个生成数组 2 年前 |