<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>opensoul.org - Revisioning with acts_as_audited Comments</title>
  <id>tag:opensoul.org,2008:/2007/6/18/revisioning-with-acts_as_audited/comments</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
  <updated>2008-11-11T15:59:04Z</updated>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Irfan</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:9469</id>
    <published>2008-11-11T15:59:04Z</published>
    <updated>2008-11-11T15:59:04Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Irfan</title>
<content type="html">&lt;p&gt;I found that when loggin destroy the latest values are not being saved to the database, hence to re-build the record to its latest state would require you to trail from create to destroy, which can be time consuming. To overcome this I changed:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def audit_destroy(user = nil)
         write_audit(:action =&amp;gt; 'destroy', :user =&amp;gt; user)
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;TO:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def audit_destroy(user = nil)
         write_audit(:action =&amp;gt; 'destroy', :changes =&amp;gt; audited_attributes, :user =&amp;gt; user)
       end&lt;/code&gt;&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Nolan Eakins</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:6803</id>
    <published>2008-07-16T00:01:29Z</published>
    <updated>2008-07-16T00:01:29Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Nolan Eakins</title>
<content type="html">&lt;p&gt;I&#8217;m surprised that acts_as_audited was your plugin. It&#8217;ll probably make a guest appearance here at Bluefish.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Daniel Schierbeck</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:6651</id>
    <published>2008-06-29T16:07:35Z</published>
    <updated>2008-06-29T16:07:35Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Daniel Schierbeck</title>
<content type="html">&lt;p&gt;I&#8217;m getting the following error when calling the &lt;pre&gt;revisions&lt;/pre&gt; method on an audited object.&lt;/p&gt;


&lt;pre&gt;NoMethodError: undefined method `first' for Sun Jun 29 17:54:32 +0200 2008:Time
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:149:in `changes'
    from (irb):5:in `inject'
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:148:in `each'
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:148:in `inject'
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:148:in `changes'
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:147:in `collect'
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:147:in `changes'
    from /home/daniel/Projects/mango/vendor/plugins/acts_as_audited/lib/acts_as_audited.rb:133:in `revision'
    from (irb):5&lt;/pre&gt;

	&lt;p&gt;Am I the only one with this problem?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Aaron</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:5183</id>
    <published>2008-01-31T20:41:16Z</published>
    <updated>2008-01-31T20:41:16Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Aaron</title>
<content type="html">&lt;p&gt;I vote to add &lt;a href=&quot;http://opensoul.org/2006/7/21/acts_as_audited#comment-3362&quot;&gt;Peter&#8217;s diff&lt;/a&gt;, which further enhances acts_as_audited to save a record&#8217;s attributes when it is deleted, and gives you an easy way to restore it, with the original id (e.g., Client.revive(2344)).&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>AH</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:4771</id>
    <published>2007-12-21T11:13:30Z</published>
    <updated>2007-12-21T11:13:30Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by AH</title>
<content type="html">&lt;p&gt;Hi Brandon,&lt;/p&gt;


	&lt;p&gt;Great plugin, thanks.&lt;/p&gt;


	&lt;p&gt;I just wonder how could I get the updated date/time of each revision?&lt;/p&gt;


	&lt;p&gt;e.g. i would like to show a revision history, then i have:&lt;/p&gt;


	&lt;p&gt;for rev in @article.revisions
  puts rev.version
  puts rev.updated_at
end&lt;/p&gt;


	&lt;p&gt;but then updated_at always show the last revision&#8217;s timestamp.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:4405</id>
    <published>2007-12-07T03:07:34Z</published>
    <updated>2007-12-07T03:07:34Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Brandon</title>
<content type="html">&lt;p&gt;Ryan,&lt;/p&gt;


	&lt;p&gt;Not really.  You could retrieve a revision and just manually set the attributes.  If you&#8217;d like to submit a patch, I&#8217;d be happy to accept it.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Ryan</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:4393</id>
    <published>2007-12-06T18:05:19Z</published>
    <updated>2007-12-06T18:05:19Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Ryan</title>
<content type="html">&lt;p&gt;Is there a way to only revert certain attributes? If we have updated first and last name, can I accept the changed last name but not first name?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Surat Mukker</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3969</id>
    <published>2007-10-15T20:32:10Z</published>
    <updated>2007-10-15T20:32:10Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Surat Mukker</title>
<content type="html">&lt;p&gt;Hi Brandon,&lt;/p&gt;


	&lt;p&gt;Thanks for the plugin. It is exactly what I was looking for.&lt;/p&gt;


	&lt;p&gt;I was looking for information of maintaining an audit trail for a project I am working on and I stumbled upon your previous blog post.&lt;/p&gt;


	&lt;p&gt;Regards
Surat&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3951</id>
    <published>2007-10-12T13:57:49Z</published>
    <updated>2007-10-12T13:57:49Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Brandon</title>
<content type="html">&lt;p&gt;Ryan,&lt;/p&gt;


	&lt;p&gt;I&#8217;ll try to clean up the one that I have and post it.  Stay tuned.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Ryan</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3935</id>
    <published>2007-10-10T20:37:28Z</published>
    <updated>2007-10-10T20:37:28Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Ryan</title>
<content type="html">&lt;p&gt;This is a great addition to my rails/ruby arsenal! I was wondering if anyone has developed a controller and view to display all of the revisions and possibly revert back to one?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Mantat</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3903</id>
    <published>2007-10-07T22:05:57Z</published>
    <updated>2007-10-07T22:05:57Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Mantat</title>
<content type="html">&lt;p&gt;I am trying to test the moves from one revision to the other in my functional tests and it seems like the models are not keeping all the changes, what am I supposed to do to make the test works?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Tim Chater</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3746</id>
    <published>2007-09-18T14:49:45Z</published>
    <updated>2007-09-18T14:49:45Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Tim Chater</title>
<content type="html">&lt;p&gt;A great plugin. Unfortunately it seems to have suffered on Edge rails as a result of the decision to make acts_as_list a plugin&#8230; even after installing the acts_as_list plugin one has to comment out line 14 of audit.rb in order to get the server to start&#8230;&lt;/p&gt;


	&lt;p&gt;Is there an easy fix? Thanks.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Geoffrey Wiseman</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3436</id>
    <published>2007-08-23T18:43:15Z</published>
    <updated>2007-08-23T18:43:15Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Geoffrey Wiseman</title>
<content type="html">&lt;p&gt;Would also love this to co-operate better with Globalize model translations.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Geoffrey Wiseman</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3435</id>
    <published>2007-08-23T18:11:50Z</published>
    <updated>2007-08-23T18:11:50Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Geoffrey Wiseman</title>
<content type="html">&lt;p&gt;Would be nice if you could retrieve a revision by date as well, since the audit table holds a created_at.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Irfan Baig</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3352</id>
    <published>2007-08-09T23:56:31Z</published>
    <updated>2007-08-09T23:56:31Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Irfan Baig</title>
<content type="html">&lt;p&gt;Hey this is cool! =)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>shadoi</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3301</id>
    <published>2007-07-30T22:30:43Z</published>
    <updated>2007-07-30T22:30:43Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by shadoi</title>
<content type="html">&lt;p&gt;Here&#8217;s the relevant exception:&lt;/p&gt;


	&lt;p&gt;NoMethodError (You have a nil object when you didn&#8217;t expect it!
The error occurred while evaluating nil.controller_name):
    /vendor/rails/actionpack/lib/action_controller/caching.rb:602:in `callback&#8217;
    /vendor/rails/actionpack/lib/action_controller/caching.rb:595:in `after&#8217;
    /vendor/rails/actionpack/lib/action_controller/filters.rb:602:in `proxy_before_and_after_filter&#8217;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>shadoi</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3300</id>
    <published>2007-07-30T22:28:19Z</published>
    <updated>2007-07-30T22:28:19Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by shadoi</title>
<content type="html">&lt;p&gt;Hello, I&#8217;m trying to use acts_as_audited with ActiveScaffold (http://activescaffold.com) but for some reason, it pukes in the &#8220;after&#8221; filter in the caching.&lt;/p&gt;


	&lt;p&gt;If I comment out line 602 in vendor/rails/actionpack/lib/action_controller/filters.rb it works great, but I&#8217;m guessing this is bad since cached objects won&#8217;t be invalidated or something&#8230;&lt;/p&gt;


	&lt;p&gt;Any suggestions?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>carlivar</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3283</id>
    <published>2007-07-26T06:04:17Z</published>
    <updated>2007-07-26T06:04:17Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by carlivar</title>
<content type="html">&lt;p&gt;Sigh, just an update. I got bogged down in my project (wife is pregnant, I have a good excuse) and wasn&#8217;t able to test the revisioning yet. But hopefully someone has&#8230; :)&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>carlivar</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3072</id>
    <published>2007-06-18T21:47:47Z</published>
    <updated>2007-06-18T21:47:47Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by carlivar</title>
<content type="html">&lt;p&gt;w00t! Thanks very much. I commented on the original blog post about adding this feature. I will test it out as soon as I get a chance.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://opensoul.org/">
    <author>
      <name>Alexander Flatter</name>
    </author>
    <id>tag:opensoul.org,2007-06-18:3067:3071</id>
    <published>2007-06-18T19:47:03Z</published>
    <updated>2007-06-18T19:47:03Z</updated>
    <category term="Code"/>
    <link href="http://opensoul.org/2007/6/18/revisioning-with-acts_as_audited" rel="alternate" type="text/html"/>
    <title>Comment on 'Revisioning with acts_as_audited' by Alexander Flatter</title>
<content type="html">&lt;p&gt;That&#8217;s funny.. I just looked over your old blog post and thought I could use this&#8230; :-)
Thanks for your work.&lt;/p&gt;</content>  </entry>
</feed>
