harryv
2007-Nov-28 22:27 UTC
Do changes on ''temporary'' record - save back to table when finished
Hello I am doing an app, where the user can edit a ''Story''. Each story contains a number of Sections (that in return contains a number of Routes each, whatsoever). Using AJAX the user can can choose to edit a Story, and within the same page edit, add and remove Sections. That is no problem at all, except: None of the changes the user does, should actually be saved into the database before he chooses to, by clicking a link or whatsoever. So even though the given Story is being added and Sections being added/removed/etc, the database should still hold the old values. Any ideas how I could do this? Regards, Harry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Donald
2007-Nov-28 22:30 UTC
Re: Do changes on ''temporary'' record - save back to table when finished
On Nov 28, 2007 4:27 PM, harryv <ichverstehe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am doing an app, where the user can edit a ''Story''. Each story > contains a number of Sections (that in return contains a number of > Routes each, whatsoever). Using AJAX the user can can choose to edit a > Story, and within the same page edit, add and remove Sections. That is > no problem at all, except: None of the changes the user does, should > actually be saved into the database before he chooses to, by clicking > a link or whatsoever. So even though the given Story is being added > and Sections being added/removed/etc, the database should still hold > the old values. > > Any ideas how I could do this?You might try acts_as_versioned. http://wiki.rubyonrails.org/rails/pages/ActsAsVersioned -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---