Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Jan 10, 2011
1 parent feebaaf commit b0a72ff
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Expand Up @@ -57,6 +57,8 @@ Use <code>destroy</code>, <code>destroy\_all</code>, <code>delete</code>, and <c

Records move into the archive table instead of being destroyed.

If any of your model's relationships have the <code>:dependent</code> option and also use <code>acts\_as\_archive</code>, those relationships will archive automatically.

What if my schema changes?
--------------------------

Expand Down Expand Up @@ -109,4 +111,30 @@ Add this line to a migration, or run it via <code>script/console</code>:
Article.migrate_from_acts_as_paranoid
</pre>

This copies all records with non-null <code>deleted_at</code> values to the archive.
This copies all records with non-null <code>deleted_at</code> values to the archive.

Running specs
-------------

Contributions are always welcome.

<pre>
gem install acts_as_archive --development
spec/run
</pre>

<code>spec/run</code> essentially runs the following:

<pre>
ACTIVERECORD=3 spec -f n -c spec
ACTIVERECORD=2 spec -f n -c spec/acts_as_archive_spec.rb
RAILS=2 spec -f n -c spec/acts_as_archive_spec.rb
RAILS=3 spec -f n -c spec/acts_as_archive_spec.rb
SINATRA=1 spec -f n -c spec/acts_as_archive_spec.rb
</pre>

If you want to hack on the supporting gems ([mover](http://github.com/winton/mover) and [also_migrate](http://github.com/winton/also_migrate)), vendor them with the following command:

<pre>
externals un
</pre>

0 comments on commit b0a72ff

Please sign in to comment.