acts_as_comparable 1.2 has been released. It includes a bug fix for passing in custom options to the declarative acts_as_comparable call. What is acts_as_comparable? acts_as_comparable is plugin for ActiveRecord which allows you to easily compare and determine the differences between two ActiveRecord model For more information see: http://www.continuousthinking.com/2007/6/30/acts_as_comparable-1-2-released To install as a plugin: script/plugin install http://rails.lotswholetime.com/svn/acts_as_comparable/tags/acts_as_comparable-1.2 To install as a gem: gem install -r acts_as_comparable Enjoy! Zach --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I don''t really get the purpose of your plugin. Why would one need a plugin to tell them that a != b? Like your example: pet1 = Pet.new :id=>1, :name=>"dog", :value=>"Tiny" pet2 = Pet.new :id=>5, :name=>"cat", :value=>"Norm" differences = pet1.differences(pet2) => {:value=>["Tiny", "Norm"], :name=>["dog", "cat"], :id=>[1, 5]} Could you tell us in a real practical example how and why would one use this plugin? -- Mark zdennis wrote:> acts_as_comparable 1.2 has been released. It includes a bug fix for > passing in custom options to the declarative acts_as_comparable call. > > What is acts_as_comparable? > acts_as_comparable is plugin for ActiveRecord which allows you to > easily compare and determine the differences between two ActiveRecord > model > > For more information see: > http://www.continuousthinking.com/2007/6/30/acts_as_comparable-1-2-released > > To install as a plugin: > script/plugin install > http://rails.lotswholetime.com/svn/acts_as_comparable/tags/acts_as_comparable-1.2 > > To install as a gem: > gem install -r acts_as_comparable > > Enjoy! > > Zach-- 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 -~----------~----~----~----~------~----~------~--~---
The reason it was originally created was for an audit log. Before saving the model, it was compared to the model that is stored in the database, and then the differences are logged. Mark On 7/1/07, Mark <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I don''t really get the purpose of your plugin. Why would one need a > plugin to tell them that a != b? Like your example: > > pet1 = Pet.new :id=>1, :name=>"dog", :value=>"Tiny" > pet2 = Pet.new :id=>5, :name=>"cat", :value=>"Norm" > > differences = pet1.differences(pet2) > => {:value=>["Tiny", "Norm"], :name=>["dog", "cat"], :id=>[1, 5]} > > Could you tell us in a real practical example how and why would one use > this plugin? > > -- > Mark > > > zdennis wrote: > > acts_as_comparable 1.2 has been released. It includes a bug fix for > > passing in custom options to the declarative acts_as_comparable call. > > > > What is acts_as_comparable? > > acts_as_comparable is plugin for ActiveRecord which allows you to > > easily compare and determine the differences between two ActiveRecord > > model > > > > For more information see: > > > http://www.continuousthinking.com/2007/6/30/acts_as_comparable-1-2-released > > > > To install as a plugin: > > script/plugin install > > > http://rails.lotswholetime.com/svn/acts_as_comparable/tags/acts_as_comparable-1.2 > > > > To install as a gem: > > gem install -r acts_as_comparable > > > > Enjoy! > > > > Zach > > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Mark Van Holstyn, Partner / Software Developer mvanholstyn-y/MygF1AHQSJ0iEMtI82hwC/G2K4zDHf@public.gmane.org, (616) 706-6842 Mutually Human Software, http://mutuallyhuman.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 -~----------~----~----~----~------~----~------~--~---
> The reason it was originally created was for an audit log. Before saving the model, it was compared to the model that is stored in the database, and then the differences are logged.Well, if that was the main purpose of your plugin than I''d say the current version is completely off because you don''t offer an option to store the differences in a log. -- Mark -- 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 -~----------~----~----~----~------~----~------~--~---
The plugin itself was not meant to store the differences in a log, the plugin was the mean to offer the developer the ability to compare 2 ActiveRecord objects. Anything could be done with that comparison, like store a log of changes. Mark On 7/1/07, Mark <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > > The reason it was originally created was for an audit log. Before saving > the model, it was compared to the model that is stored in the database, and > then the differences are logged. > > Well, if that was the main purpose of your plugin than I''d say the > current version is completely off because you don''t offer an option to > store the differences in a log. > > -- > Mark > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Mark Van Holstyn, Partner / Software Developer mvanholstyn-y/MygF1AHQSJ0iEMtI82hwC/G2K4zDHf@public.gmane.org, (616) 706-6842 Mutually Human Software, http://mutuallyhuman.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 -~----------~----~----~----~------~----~------~--~---