奇妙な問題が発生しています。私はそれが以前から使用されていて、このバージョン(https://github.com/rails/rails/issues/1553)で修正されていると確信していました。レール3.0.9とescape_javascript stilが動作しませんか?
<%= form_for Message.new, :html => {:id => "post_submit_form", :remote => true} do |f|%>
<fieldset>
<%= f.text_area :message, :id => 'post' %>
<%= f.submit 'Post', :class => "button post" %>
</fieldset>
<% end %>
HTMLをレンダリングするためcreate.js.erbファイル:私はそれを提出するという単純なコントローラ
class MessagesController < ApplicationController
def create
@msg = Message.new(params[:message])
@msg.user_id = session[:user_id]
@msg.room_hash = session[:current_room_hash]
@msg.save!
end
end
形持っ
$('#pending_item').html(<%= escape_javascript(render(:partial => 'stream_item'))%>);
をjqueryの1.6.1を使用すると、最新のrails.js ajax:errorにバインドして、ファイアバグでparsererrorを取得し続けます。
$('#pending_item').html('<h2>hello</h2>');
それは、ページのロード時に表示するために繰り返し使用しているとして、私はその部分的な作品を知っている:私はそれだけで次の操作を実行したかのように素晴らしい作品escape_javascriptに問題があると思います。私は持っている場合Additionaly:
Rails 3.0.9 application starting in development on http://0.0.0.0:3000
:部分で
<h2>hello</h2>
私は同じparsererror
を持っている私は、アプリを起動したとき、それはこのことを言うように私は3.0.9を使用しています確信しています
アイデア?