Have you tried to put the code in partial? Therefore, instead of
render :js => "jQuery.facebox(#{...})"
try
render :partial => "my_facebox_popup"
Then, inside your _my_facebox_popup.html.erb partial code, type:
<script type = "text/javascript"> ... </script>
debug any errors you get with firebug .
Schneems
source share