【发布时间】:2010-02-13 08:05:19
【问题描述】:
AJAX + RAILS 问题。我收到以下路由错误:
<div class="card-field">
<h6><imgsrc="/images/red_icon.png" width="16" alt="" align="absmiddle" class="image-3" onmouseover="ajax_showTooltip(window.event,'/quickadd_notes_help.html.erb?ranId='+Math.random(),this,'','');return false;" /></h6>
<p>Company Name:</p>
<input type="text" name="company" id="company" size="50" />
</div>
ActionController::RoutingError (No route matches "/quickadd_notes_help.html.erb" with {:method=>:post}):
不知道我在这里做错了什么。当我去
时,我的控制器和视图都工作正常http://localhost:3000/cats
http://localhost:3000/cats/quickadd_notes_help
我尝试过以多种方式修改我的 HTML!
window.event,'/quickadd_notes_help.html.erb?ranId='...
window.event,'/quickadd_notes_help?ranId='...
window.event,'/quickadd_notes_help.html?ranId='...
我有同样的例子在托管的非 Rails 环境中运行良好。但似乎无法让它在 Rails 环境中工作。我的 routes.rb 文件如下所示:
map.resources :cat
感谢您提供的任何帮助!
谢谢, 席德
【问题讨论】:
标签: javascript ruby-on-rails ajax