Passing a ruby var to a js var

Hi I want to create a graph with js in my application
but i don’t know if there’s a way to pass the information
in my ruby var to the var in js that I will use for draw
the graph.

For example this var

@days = [1,2,3,4,5,6,7,8,9…,365]

On Aug 26, 2011, at 10:32 AM, art tav wrote:

Hi I want to create a graph with js in my application
but i don’t know if there’s a way to pass the information
in my ruby var to the var in js that I will use for draw
the graph.

For example this var

@days = [1,2,3,4,5,6,7,8,9…,365]

Perhaps this Stack Overflow posting may help:

http://stackoverflow.com/questions/2464966/passing-ruby-variables-to-javascript-function-in-rails-view

–Mark

Mark H. Nichols wrote in post #1018670:

On Aug 26, 2011, at 10:32 AM, art tav wrote:

Hi I want to create a graph with js in my application
but i don’t know if there’s a way to pass the information
in my ruby var to the var in js that I will use for draw
the graph.

For example this var

@days = [1,2,3,4,5,6,7,8,9…,365]

Perhaps this Stack Overflow posting may help:

http://stackoverflow.com/questions/2464966/passing-ruby-variables-to-javascript-function-in-rails-view

–Mark

Thanks for the link