I''m looking for a solution to read and store the differences between two updates to a row in my DB. For example, if a user changes the number of hours they worked after submitting their timesheet, I want to be able to show a manager the change they made and then report that adjustment.>From looking at the docs, acts_as_versioned works for versioning amodel and then stepping through previous revisions, but there doesn''t seem to be a way to compare the differences between two revisions. Am I wrong in that assumption? If so, can someone point me to the docs I should be looking at. If I''m not wrong, is there another plugin available or does anyone have any suggestions for how to go about implementing a versioning system in the way I''m looking for. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8/14/07, Justin Williams <carpeaqua-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m looking for a solution to read and store the differences between > two updates to a row in my DB. > > For example, if a user changes the number of hours they worked after > submitting their timesheet, I want to be able to show a manager the > change they made and then report that adjustment. > > >From looking at the docs, acts_as_versioned works for versioning a > model and then stepping through previous revisions, but there doesn''t > seem to be a way to compare the differences between two revisions. Am > I wrong in that assumption? If so, can someone point me to the docs I > should be looking at. > > If I''m not wrong, is there another plugin available or does anyone > have any suggestions for how to go about implementing a versioning > system in the way I''m looking for.I''ve been using the riff plugin with Lighthouse. http://tfletcher.com/svn/rails-plugins/riff/ It helps to store a serialized hash of the diffs in the version model too, otherwise you have to recalculate each time the view is rendered. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---
On Aug 14, 2:35 pm, "Rick Olson" <technowee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve been using the riff plugin with Lighthouse. > > http://tfletcher.com/svn/rails-plugins/riff/ > > It helps to store a serialized hash of the diffs in the version model > too, otherwise you have to recalculate each time the view is rendered. >Awesome plugin suggestion, Rick. Thanks for pointing it out. - j --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Justin Williams wrote:> I''m looking for a solution to read and store the differences between > two updates to a row in my DB.http://opensoul.org/2006/07/21/acts_as_audited/ Great for logs or versioning (which was recently added). Much more efficient than acts_as_versioned. -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---