Rails Surfer wrote:> I need to send geo coördinates from a mysql database to a google maps
> javascript.
>
> There´s no problem to get them into rails...But how can i send them to
> javascript ?
>
> I know javascript is client side so i think it´s impossible to include
> ruby variables...
>
> Suggestions ?
What I always do is this: have Rails put the data in a hidden HTML
element with a known ID. Then the JavaScript can read the contents of
that element.
>
> Thanks
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.