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
Post a Comment