【发布时间】:2014-04-25 19:58:24
【问题描述】:
我是 ruby on rails 的新手。我有一个会员,每个会员都有很多健康记录,我为会员制作了一个按钮,可以在 HealthyGrocery/app/views/members/hub.html.erb 中添加新的健康记录,其中中心是主页
<%= button_to "new health record", redirect_to= 'http://localhost:3000/health_record/new', :method => "get" %>
通过此按钮,我想重定向到此链接“localhost:3000/health_record/new”,该链接位于 HealthyGrocery/app/views/health_record/new.html.erb
当我运行服务器并按下按钮制作新的健康记录时,它给了我这个错误screenshot of the error
【问题讨论】: