Posts [ 3 ]

Topic: How to render secondary page passing instance variable?

Hello folks,

I am rendering an index action view which when loading makes a number of ajax calls to go and grab a bunch of historical data to generate some graphs. Right now the graphs render in the same view once the data is retrieved via jQuery and Morris.js. What I would like to do is have a button one can click to render the graphs on a secondary page. Would you be able to help me with how I might go about this. The data can reside in a javascript array var until the page load is triggered via a button click. I could go grab the data again via calling a show action and rendering a new page, but it kind of defeats my purpose... to render the initial page without delay. Any direction would be appreciated.