Skip to content

Commit

Permalink
Fix loading order issue. see README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
El Matou committed Mar 15, 2011
1 parent 18b7f65 commit b76777a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 12 additions & 2 deletions README.md
Expand Up @@ -5,9 +5,18 @@ Don't delete your records, move them to a different table.

Like <code>acts\_as\_paranoid</code>, but doesn't mess with your SQL queries.

This is a Fork !
----------------
In order to fix [issue#21](https://github.com/winton/acts_as_archive/issues#issue/21) and any loading order issue.
Loading of <code>::Archive</code> classes is not automatic anymore.
You have to past one of the lines below (or all of them if you don't now wich framework you are using ?!) in <code>environment.rb</code> or anywhere proceed after all gems are loaded.
<pre>
require "acts_as_archive/adapters/rails#{Rails.version[0..0]}" if defined?(Rails)
require "acts_as_archive/adapters/sinatra" if defined?(Sinatra)
</pre>

Install
-------

<pre>
gem install acts_as_archive
</pre>
Expand Down Expand Up @@ -127,4 +136,5 @@ This copies all records with non-null <code>deleted_at</code> values to the arch
Running specs
-------------

There is a [wiki entry](https://github.com/winton/acts_as_archive/wiki/Running-Specs) that describes the development setup in-depth.
There is a [wiki entry](https://github.com/winton/acts_as_archive/wiki/Running-Specs) that describes the development setup in-depth.

3 changes: 0 additions & 3 deletions lib/acts_as_archive.rb
Expand Up @@ -225,6 +225,3 @@ def delete_sql_with_archive(sql, name = nil)
::ActiveRecord::Base.send(:include, ::ActsAsArchive::Base)
::ActiveRecord::ConnectionAdapters::DatabaseStatements.send(:include, ::ActsAsArchive::DatabaseStatements)

require "acts_as_archive/adapters/rails#{Rails.version[0..0]}" if defined?(Rails)
require "acts_as_archive/adapters/sinatra" if defined?(Sinatra)

0 comments on commit b76777a

Please sign in to comment.