title: Rails: GoogleDocs-Style Autosave
body: <p>I'm trying to build a Rails app in which you can edit the same model from several different locations on the page. I want changes to be saved automatically every X seconds, with an option of manually triggering a save.</p>
  
  <p>I have come up with a solution, but it seems very complicated, and I assume other Rails users have already faced similar questions.</p>
  
  <p>The solution I came up with, is to have a hidden form on my page that is the one actually submitted, and then have multiple "dummy" forms scattered around the page that update the hidden form.</p>
  
  <p>Once submitted, the hidden form updates the model, and the model contains logic to determine which RJS files should be returned in response. These are bundled up and sent as an update response.</p>
  
  <p><em>some limitations:</em></p>
  
  <ul>
  <li>Can't wrap the whole page in one form tag (there are multiple models/controllers on the page)</li>
  <li>The same field might be editable from multiple locations</li>
  </ul>
  
  <p>Anyone have a more efficient way?</p>