0

I have a page that renders multiple partials, including a Flash div that takes a while to start up.

I have a button that I want to re-hit the controller, pull down any new data, and reload all the partials in the page except for the Flash div.

I've looked into rjs, but it seems like you need to add another route and controller method to accomplish this. Is there a way to keep all the logic contained in the same page?

Kevin Li
  • 1,540
  • 2
  • 17
  • 23

1 Answers1

1

You should be able to do this with jQuery.

When the link is clicked, get the whole page via ajax, then replace all of the elements (you will need IDs for everything you wish to replace) from the fetched HTML, except for your Flash div.

doesterr
  • 3,955
  • 19
  • 26