jquery - escaping javascript for a loop in rails -



jquery - escaping javascript for a loop in rails -

when seek next in .js.erb file:

$("#id").html( "<%= escape_javascript( @units.each |unit| sync partial: 'edit_unit', resource: unit end ) %>" );

i error:

undefined method `gsub' #<array:0x6e2cc98>

i've tested rails code separately (i.e. in rails view, opposed .js.erb file) , appears word fine.

am using html() , escape_javascript() methods correctly?

note: i'm using 'sync' gem, hence sync partial call.

jquery ruby-on-rails escaping

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -