On Sep 21, 8:22 pm, Thorsten Müller <[EMAIL PROTECTED]> wrote:
> there are two functions:
> array_or_string_for_javascript
> options_for_javascript
>
> have a look at the source first one, it's basically doing:
> "['#{option.join('\',\'')}']"
>
> joining the array elements to a string

to_json would also work:

<%= params[:coordinates].to_json %>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to