Ruby on rails 为什么这种基本的路由情况不起作用:
错误: 编辑_profile.html.haml:Ruby on rails 为什么这种基本的路由情况不起作用:,ruby-on-rails,routes,Ruby On Rails,Routes,错误: 编辑_profile.html.haml: No route matches "/en/member/update_profile" 在浏览器中: =simple_form_for @m, :url => member_update_profile_path do |f| 耙道: post "update_profile" 原来,和rails的简单表单不在同一页上,请参见下面的内容: member_update_profile POST /:locale/me
No route matches "/en/member/update_profile"
在浏览器中:
=simple_form_for @m, :url => member_update_profile_path do |f|
耙道:
post "update_profile"
原来,和rails的简单表单不在同一页上,请参见下面的内容:
member_update_profile POST /:locale/member/update_profile(.:format) {:controller=>"member", :action=>"update_profile"}
您是否在做一些棘手的事情,使控制器使用模型名称的单数形式而不是rails默认的复数形式?
member_update_profile POST /:locale/member/update_profile(.:format) {:controller=>"member", :action=>"update_profile"}
<form accept-charset="UTF-8" action="/en/member/update_profile" class="simple_form user" id="edit_user_1508" method="post">
<div style="margin:0;padding:0;display:inline">
<input name="utf8" type="hidden" value="✓">
<input name="_method" type="hidden" value="put">
<input name="authenticity_token" type="hidden" value="AYxvKwu+qH7vjup1h4/TlGBbvg2M10koPdJDNk2xuOw=">
</div>
=simple_form_for @m, :url => member_update_profile_path, :html => {:method => :post} do |f|