[万分紧急] 请求回复 - autocomplete 请求action时发生422错误!

franksinger 2009-03-13 10:33:50
在用auto_complete_field请求url时报错, 返回http状态422. 根本没有请求到action.
IDE:Netbeans6.5
错误信息如下: 127.0.0.1 - - [13/Mar/2009:10:11:08 CST] "POST /configurations/autocomplete_promptname HTTP/1.1" 422 14261 http://localhost:3000/configurations/testcycle/3 -> /configurations/autocomplete_promptname

部分代码如下:
<%= text_field_tag "MOC#{testcycle_mbist_output_field.id}", testcycle_mbist_output_field.time, :size => '30', :class => 'box_output_readonly', :readonly => true %>
<div class="auto_complete" id="prompt_MOC<%= testcycle_mbist_output_field.id %>"></div>
<%= auto_complete_field "MOC#{testcycle_mbist_output_field.id}",
:update => "prompt_MOC#{testcycle_mbist_output_field.id}",
:url => {:controller => 'configurations', :action => 'autocomplete_promptname'},
:tokens => ['+', '-', '*', '/'] %>


哪位仁兄知道该如何解决? 我在另一个测试工程中,使用类似代码,没有出现问题!难道是配置问题???急等回复!
...全文
159 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
aotianlong 2009-06-12
  • 打赏
  • 举报
回复
skip_before_filter :verify_authenticity_toke 在控制器中写上这个
还有个可能是你的routes定义的时候没有指定请求方法 比如 :members=>{:action=>:any} 查API吧
taito 2009-06-03
  • 打赏
  • 举报
回复
一个是看你的route配置的对不对。有没有定义configurations这个,另一方面还是你贴出代码版段来看最好。
franksinger 2009-03-15
  • 打赏
  • 举报
回复
原因是action configurations访问不到. 不知道为什么
taito 2009-03-13
  • 打赏
  • 举报
回复
422,无效的资源(如Validation失败),引发ActiveResource::ResourceInvalid异常

你在地址栏中直接请求这个页面 /configurations/autocomplete_promptname 试试会不会发生异常。

2,763

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ruby/Rails
社区管理员
  • Ruby/Rails社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧