How to send back js.haml in rails

后端 未结 4 1899
一生所求
一生所求 2020-12-13 02:32

I have a rails create action which send back some jquery in a file:

create.js.erb

var appearance = $(\"<%= escape_javascript(rend         


        
4条回答
  •  感情败类
    2020-12-13 03:14

    Well looks like you dont need the != in front of each line. The following works for me just fine. Im using Rails 3 and latest version of HAML

    $('#comments_table_header').after('#{escape_javascript(render :partial => 'row', :locals => { :comment => @comment })}');
    

提交回复
热议问题