简单的 Rails 表单助手错误

发布于 2025-01-06 06:28:48 字数 461 浏览 2 评论 0原文

我对 Rails 还很陌生,我试图找出我在这里到底做错了什么。

这是我收到的错误:

#<#:0x007fdcc176bbf0> 的未定义方法“thoughts_path”

除了此应用程序跟踪错误之外:

app/views/thoughts/create.html.erb:3:in `_app_views_thoughts_create_html_erb___4175069892643358175_70293055466360'

这是 Gist 上源代码的链接 https://gist.github.com/78037c4febfaa270a67e

I'm still very new to rails and I'm trying to figure out what exactly I've done wrong here.

This is the error that I'm getting:

undefined method `thoughts_path' for #<#:0x007fdcc176bbf0>

In addition to this Application Trace error:

app/views/thoughts/create.html.erb:3:in `_app_views_thoughts_create_html_erb___4175069892643358175_70293055466360'

And here's a link to the source on Gist
https://gist.github.com/78037c4febfaa270a67e

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

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

发布评论

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

评论(1

清晰传感 2025-01-13 06:28:48

你的路由(config/routes.rb)文件是什么样的?它包含资源:想法吗?如果没有,请添加它并查看是否有效。

What does your routes(config/routes.rb) file look like ? Does it contain resources :thoughts ? If not, add it and see if it works.

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