Ramaze 中与 a/r 助手的链接

发布于 2024-07-24 03:20:20 字数 521 浏览 5 评论 0原文

在 ramaz (2009.06.04) 中,链接助手已更改,我在使用它时遇到了一些问题。 我想创建一个到 MainController -> 的链接 测试操作

#{a('Testlink', r(:test))}

如果 URL 不在特定控制器中,则此方法有效。 如果用户位于其他控制器中,例如 http://site/othercontroller/testtwo,则测试链接将链接到http://site/othercontroller/test

如何将链接常量设置为 http://site/test

In ramaze (2009.06.04) the link helper has changed and I have some problems to use it. I want to create a link to the MainController -> test action

#{a('Testlink', r(:test))}

This works if the URL is not in a specific controller. If the user is in a other controller like http://site/othercontroller/testtwo, the Testlink are linked to http://site/othercontroller/test.

How can I set the link constant to http://site/test ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

上课铃就是安魂曲 2024-07-31 03:20:20

使用 Controller.a 方法,例如 #{UsersController.a('Remove', :remove_target, tgt.id)}

Use the Controller.a method, like #{UsersController.a('Remove', :remove_target, tgt.id)}

没有心的人 2024-07-31 03:20:20

尝试 #{a('Testlink', MainController.r(:test))}

Try #{a('Testlink', MainController.r(:test))}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文