开发者

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

开发者 https://www.devze.com 2023-02-20 01:25 出处:网络
Why am I getting a try/catch block, instead of re-rendering the partial, with the following code ? VIEW:

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

精彩评论

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