Forum: Ruby on Rails javascript function needs rails variable

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
41c5f1c3c0fc8900b307e25777e1a2ba?d=identicon&s=25 Rabia (Guest)
on 2009-01-28 07:03
(Received via mailing list)
<script type="text/javascript">

    show_coords(<%= @pic_comments.to_json %>,"main",'<%=$domain%>/
users/update_picture_div',<%= %>)

I have implement this but rails variables are not working.
D69d23d8e811e8ab2a8593380d6ede63?d=identicon&s=25 Jeff Emminger (jemminger)
on 2009-01-28 16:42
(Received via mailing list)
This will only work if that script block is in an .erb template.
41c5f1c3c0fc8900b307e25777e1a2ba?d=identicon&s=25 Rabia Akhtar (Guest)
on 2009-01-29 05:24
(Received via mailing list)
it starts working
Rabia Akhtar
This topic is locked and can not be replied to.