Sha256: 97616917f93d0c09d30b24ea66da11c0d7ee394b2721422c577b12615c272f75

Contents?: true

Size: 547 Bytes

Versions: 17

Compression:

Stored size: 547 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../require")
Require.lib!

module ActsAsArchive
  
  def self.update(*models)
    models.each do |klass|
      if klass.respond_to?(:acts_as_archive?) && klass.acts_as_archive?
        time = Benchmark.measure do
          klass.create_archive_table
          klass.migrate_from_acts_as_paranoid
          klass.create_archive_indexes
        end
        $stdout.puts "-- ActsAsArchive.update(#{models.join(', ')})"
        $stdout.puts "   -> #{"%.4fs" % time.real}"
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
brianjlandau-acts_as_archive-0.2.8 lib/acts_as_archive.rb
brianjlandau-acts_as_archive-0.2.7 lib/acts_as_archive.rb
brianjlandau-acts_as_archive-0.2.6 lib/acts_as_archive.rb
sideshowbandana-acts_as_archive-0.2.7 lib/acts_as_archive.rb
sideshowbandana-acts_as_archive-0.2.6 lib/acts_as_archive.rb
foolabs-acts_as_archive-0.2.12 lib/acts_as_archive.rb
gravis-acts_as_archive-0.2.11 lib/acts_as_archive.rb
gravis-acts_as_archive-0.2.10 lib/acts_as_archive.rb
gravis-acts_as_archive-0.2.7 lib/acts_as_archive.rb
gravis-acts_as_archive-0.2.9 lib/acts_as_archive.rb
gravis-acts_as_archive-0.2.8 lib/acts_as_archive.rb
gravis-acts_as_archive-0.2.6 lib/acts_as_archive.rb
acts_as_archive-0.2.5 lib/acts_as_archive.rb
acts_as_archive-0.2.4 lib/acts_as_archive.rb
acts_as_archive-0.2.3 lib/acts_as_archive.rb
acts_as_archive-0.2.2 lib/acts_as_archive.rb
acts_as_archive-0.2.1 lib/acts_as_archive.rb