开发者

Ajax returns try/catch code instead of re-rendering the partial - Why?

Why am I getting a try/catch block, instead of re-rendering the partial, with the following code ?

VIEW:

<% form_remote_tag :url => { :controller => 'my_controller', :action => 'n开发者_JS百科ew_thing' } -%>

    [...whatever form code...]

    <%= submit_tag 'Continue' %>

<% end -%>

CONTROLLER:

def new_thing

  [...whatever controller code...]

  render :update do |page|
    page.replace_html "new", :partial => "new_thing"
  end
end


Holy sh..., I'm sorry - Here's what was wrong:

<%= javascript_include_tag :defaults %>

...was not included in the

<head></head>

tag.

Hope that will help the next n00b ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜