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.
Rabia (Guest)
on 2009-01-28 08: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.
Jeff E. (Guest)
on 2009-01-28 17:42
(Received via mailing list)
This will only work if that script block is in an .erb template.
Rabia Akhtar (Guest)
on 2009-01-29 06:24
(Received via mailing list)
it starts working
Rabia Akhtar
This topic is locked and can not be replied to.