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.

Thank you,

td

Re: How to render secondary page passing instance variable?

As far as I understand what you try to do, is opening a new page where the graph is being rendered right?I would do something like:

<%= link_to 'rendering', what_path_you_want(), :target =>

Last edited by ReBa (2013-01-08 05:47:06)

Re: How to render secondary page passing instance variable?

Cookies?
Data could be too much to include in a get request?
You could try HTML5 local storage?

Learning rails, one day at a time.

http://keilmiller.com