【发布时间】:2017-08-23 08:47:27
【问题描述】:
我在控制器系列中有这个动作
def hello
end
带视图 hello.html.erb
hello world
在同一个控制器中的索引视图中我有
<%= link_to 'hello', families_hello_path %>
在我的 routes.erb 中我做了这个
post 'families/hello', to: 'families#hello'
但是当取消点击你好我有这个错误:
Couldn't find Family with 'id'=hello
问题出在哪里?
【问题讨论】:
-
您可以将
bundle exec rake routes |grep families的输出添加到您的问题中吗? -
你在找这个吗?
-
families_hello GET /families/hello(.:format)family#hello