Re: [Rails] getting the correct index in a ruby array in a javascript lo

2010-05-16 Thread Tim Lovett
You're confusing server side and client side code. Javascript works after a webpage has been returned but Ruby works when a page is being fetched. So if you want to be able to iterate over a bunch of values you'll need to create a javascript array that contains the values of the Ruby array. *If yo

[Rails] getting the correct index in a ruby array in a javascript lo

2010-05-15 Thread Brandon Fratello
So I'm very new to both ruby and javascript, but the basic problem is. I have a ruby array @events_this_month, and i'm running a javascript loop that basically needs the information from this array. The problem is I can't seem to set the proper index for my ruby array. What I have looks like this: