views:

607

answers:

4

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.

+4  A: 

Are you actually missing that quote?

$(".edit_business").append(...)
Craig Martek
I'm an idiot. :C
Mike
Excellent catch!
Mike Clark
+1  A: 

You're missing a quote in $(".edit_business")

FluidFoundation
+1  A: 
(".edit_business)

shoud be

(".edit_business")
marcgg
A: 

I often just use render(:file => filename).to_json

Duncan Beevers