I need to implement multiple undo functionality into a Rails app (my first one). Essentially, every .update and .save needs to record the previous data set and save them in a history table along with some identifying stamps, so each db action can be rolled back at any time. From what i can tell, i could implement this manually using observers perhaps; but this is Rails, so i wonder if there isn''t anything in the framework to make this a little easier. I''m not asking to spell out the exact solution for me, of course, just to point me in the right direction if there is anything in Rails that could help me with this. Thanks. sebastian
This should help: http://wiki.rubyonrails.com/rails/pages/ActsAsVersioned Regards, Tony On 2/27/06, Sebastian Friedrich <sebastian@feldpost.com> wrote:> > I need to implement multiple undo functionality into a Rails app (my > first one). Essentially, every .update and .save needs to record the > previous data set and save them in a history table along with some > identifying stamps, so each db action can be rolled back at any time. > From what i can tell, i could implement this manually using > observers perhaps; but this is Rails, so i wonder if there isn''t > anything in the framework to make this a little easier. I''m not > asking to spell out the exact solution for me, of course, just to > point me in the right direction if there is anything in Rails that > could help me with this. Thanks. > > sebastian > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060227/08692c87/attachment-0001.html
Look at the acts_as_versioned plugin. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Sebastian Friedrich Sent: Monday, February 27, 2006 3:30 PM To: rails@lists.rubyonrails.org Subject: [Rails] Multiple Undo History I need to implement multiple undo functionality into a Rails app (my first one). Essentially, every .update and .save needs to record the previous data set and save them in a history table along with some identifying stamps, so each db action can be rolled back at any time. From what i can tell, i could implement this manually using observers perhaps; but this is Rails, so i wonder if there isn''t anything in the framework to make this a little easier. I''m not asking to spell out the exact solution for me, of course, just to point me in the right direction if there is anything in Rails that could help me with this. Thanks. sebastian _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails