Rails Newby here.
I am trying to send an array to array_or_string_for_javascript. I get
this error:
wrong number of arguments (1 for 0)
Below is my code:
<%
@img = Array.new
@project.images.find(:all).each do |g|
@img << g.image
end
array_or_string_for_javascript(@img)
%>
<script> var jVar = <%= array_or_string_for_javascript(options[:img])
%>; </script>
Kind of baffled by this, basically i simply want to populate a
javascript array with image path''s from my db.
Any help would be greatly appreciated.
Thanks
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---