Search code examples
javascriptruby-on-railsillegal-characters

illegal character, Javascript


I am trying to run jquery through a rails app. I have the edit information in a popup window and i want to change that to show information after they click update. It should work but this line

$(".edit_business).append("<%= escape_javascript(render(:file => 'businesses/show')) %>");

is throwing an illegal character issue. This code is in my update.js.erb file. The escape_javascript is there but it's throwing an error in my console.


Solution

  • Are you actually missing that quote?

    $(".edit_business").append(...)