Module: ActsAsArchive::DatabaseStatements

Defined in:
lib/acts_as_archive.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



193
194
195
196
197
198
199
200
201
202
203
# File 'lib/acts_as_archive.rb', line 193

def self.included(base)
  unless base.included_modules.include?(InstanceMethods)
    base.send :include, InstanceMethods
    base.class_eval do
      unless method_defined?(:delete_sql_without_archive)
        alias_method :delete_sql_without_archive, :delete_sql
        alias_method :delete_sql, :delete_sql_with_archive
      end
    end
  end
end