`
orcl_zhang
  • 浏览: 234172 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

rails recipes -- in-place form editing

阅读更多
As we saw in the recipe, we can see what action the Ajax control is attempting to call by looking at our web server log.But since it’s making a POST, we can’t see the parameters in the log.How do you know what parameters an autogenerated form is expecting without reading through piles of source code?What I did was to create an action with the name that I saw in the logs that looked like the following:
#从日志中看不到传递的参数,可以这样写
def set_contact_name
  raise params.inspect
end

When I submitted the form, I saw the Rails error message with a list of the submitted parameters at the top.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics