9

In an Rails app I want to modify the DOM of a web page using javascript

Can I save the resulting HTML (of the whole page) after each modification to a database?

Thanks.

Victor
  • 23,172
  • 30
  • 86
  • 125

1 Answers1

6

With jQuery you could use var html = $(document).html(); Then post the html with $.ajax() to the controller where you choose to save it.

Benbob
  • 13,876
  • 18
  • 79
  • 114