Hello all, I need to create a object history, as I''ll have multiple editors for a site i am working on. Of course it would be great to have the ability to restore an object to its state and undo the damage due to a bad editor, but I''ll settle for a system that will tell me who to blame. Basically I want to track who changed what on what object. I would like your input on the best way to do this, or someone to stop me if its already been done. My first thought, was to simply make the activity log and log the "self.changed.to_yaml" to the database, but I would like more information then that if possible, adding this along with the "self.to_yaml" would provide semi-readable output on the changed values but no details on the original values. I would, if at all possible like to make it a bit more detailed, but right now I''m looking for someone with a bit more experience in AR to provide me with some tips/tricks. Thanks, Brian -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 9, 11:48 am, PsiPro <arjes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > I need to create a object history, as I''ll have multiple editors for a > site i am working on. Of course it would be great to have the ability > to restore an object to its state and undo the damage due to a bad > editor, but I''ll settle for a system that will tell me who to blame. > > Basically I want to track who changed what on what object. I would > like your input on the best way to do this, or someone to stop me if > its already been done. > > My first thought, was to simply make the activity log and log the > "self.changed.to_yaml" to the database, but I would like more > information then that if possible, adding this along with the > "self.to_yaml" would provide semi-readable output on the changed > values but no details on the original values. > > I would, if at all possible like to make it a bit more detailed, but > right now I''m looking for someone with a bit more experience in AR to > provide me with some tips/tricks. > > Thanks, > BrianThere''s http://wiki.github.com/collectiveidea/acts_as_audited/. That might work for your use case. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Feb 8, 2010 at 23:37, Erol Fornoles <erol.fornoles-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Feb 9, 11:48 am, PsiPro <arjes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hello all, >> >> I need to create a object history, as I''ll have multiple editors for a >> site i am working on. Of course it would be great to have the ability >> to restore an object to its state and undo the damage due to a bad >> editor, but I''ll settle for a system that will tell me who to blame. >> >> Basically I want to track who changed what on what object. I would >> like your input on the best way to do this, or someone to stop me if >> its already been done. >> >> My first thought, was to simply make the activity log and log the >> "self.changed.to_yaml" to the database, but I would like more >> information then that if possible, adding this along with the >> "self.to_yaml" would provide semi-readable output on the changed >> values but no details on the original values. >> >> I would, if at all possible like to make it a bit more detailed, but >> right now I''m looking for someone with a bit more experience in AR to >> provide me with some tips/tricks. >> >> Thanks, >> Brian > > There''s http://wiki.github.com/collectiveidea/acts_as_audited/. That > might work for your use case. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >Also might want to check out different database solutions - CouchDB for instance has versioning built-in for all documents. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Feb-09 13:08 UTC
Re: Object Version Control, or at least edit log
Erol Fornoles wrote:> On Feb 9, 11:48�am, PsiPro <arjes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> Thanks, >> Brian > > There''s http://wiki.github.com/collectiveidea/acts_as_audited/. That > might work for your use case.Yup. Or put something similar in a trigger. More work but more airtight. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
That looks like what I was planning on doing, but a little light on the changed details. Unless anyone has any other suggestion I''ll just have to write my own. Brian On Feb 8, 11:37 pm, Erol Fornoles <erol.forno...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Feb 9, 11:48 am, PsiPro <arjes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello all, > > > I need to create a object history, as I''ll have multiple editors for a > > site i am working on. Of course it would be great to have the ability > > to restore an object to its state and undo the damage due to a bad > > editor, but I''ll settle for a system that will tell me who to blame. > > > Basically I want to track who changed what on what object. I would > > like your input on the best way to do this, or someone to stop me if > > its already been done. > > > My first thought, was to simply make the activity log and log the > > "self.changed.to_yaml" to the database, but I would like more > > information then that if possible, adding this along with the > > "self.to_yaml" would provide semi-readable output on the changed > > values but no details on the original values. > > > I would, if at all possible like to make it a bit more detailed, but > > right now I''m looking for someone with a bit more experience in AR to > > provide me with some tips/tricks. > > > Thanks, > > Brian > > There''shttp://wiki.github.com/collectiveidea/acts_as_audited/. That > might work for your use case.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Feb-09 15:23 UTC
Re: Object Version Control, or at least edit log
PsiPro wrote:> That looks like what I was planning on doing, but a little light on > the changed details.What are you referring to? Please quote when replying; we can''t read your mind. :)> > Unless anyone has any other suggestion I''ll just have to write my own.There are others -- for example, acts_as_versioned . You might want to see which one Redmine uses. You probably don''t have to write your own.> > BrianBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You may want to take a look at vestal_versions: http://github.com/laserlemon/vestal_versions Haven''t used it myself, but looks to be able to revert objects to pretty much any previous version *and* show what changed between arbitrary pairs of versions. --Matt Jones On Feb 9, 9:47 am, PsiPro <arjes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> That looks like what I was planning on doing, but a little light on > the changed details. > > Unless anyone has any other suggestion I''ll just have to write my own. > > Brian > > On Feb 8, 11:37 pm, Erol Fornoles <erol.forno...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Feb 9, 11:48 am, PsiPro <arjes...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello all, > > > > I need to create a object history, as I''ll have multiple editors for a > > > site i am working on. Of course it would be great to have the ability > > > to restore an object to its state and undo the damage due to a bad > > > editor, but I''ll settle for a system that will tell me who to blame. > > > > Basically I want to track who changed what on what object. I would > > > like your input on the best way to do this, or someone to stop me if > > > its already been done. > > > > My first thought, was to simply make the activity log and log the > > > "self.changed.to_yaml" to the database, but I would like more > > > information then that if possible, adding this along with the > > > "self.to_yaml" would provide semi-readable output on the changed > > > values but no details on the original values. > > > > I would, if at all possible like to make it a bit more detailed, but > > > right now I''m looking for someone with a bit more experience in AR to > > > provide me with some tips/tricks. > > > > Thanks, > > > Brian > > > There''shttp://wiki.github.com/collectiveidea/acts_as_audited/. That > > might work for your use case.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Feb-09 16:32 UTC
Re: Object Version Control, or at least edit log
Matt Jones wrote:> You may want to take a look at vestal_versions: > > http://github.com/laserlemon/vestal_versions > > Haven''t used it myself, but looks to be able to revert objects to > pretty much any previous version *and* show what changed between > arbitrary pairs of versions. > > --Matt JonesOoh, thanks! I''m writing a medical records app, so I''m likely to need this soon. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> You may want to take a look at vestal_versions: > > http://github.com/laserlemon/vestal_versions > > Haven''t used it myself, but looks to be able to revert objects to > pretty much any previous version *and* show what changed between > arbitrary pairs of versions. > > --Matt JonesI have to agree, that looks great. Thanks for the link. Brian -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> You may want to take a look at vestal_versions:>http://github.com/laserlemon/vestal_versions> Haven''t used it myself, but looks to be able to revert objects to > pretty much any previous version *and* show what changed between > arbitrary pairs of versions.> --Matt JonesSo I looked into Vestal Versions and it appears there is an issue with it using the class name Tag I already have a tagging and tags relationship and their use of those names is causing problems with Thinking Sphinx and Formtastic When thinking sphinx tries to index tag_ids, or when formtastic queries the tag relationship its talking to the VestalVersions model, which doesn''t talk like a normal relationship. I end up with the following error: "`reflect_on_association'' for VestalVersions::Tagging:Module" If I remove thinking sphinx''s index on tag_ids it will be all fine and dandy until formtastic throws the same error. Brian -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.