lib/active_archive/base.rb in active_archive-1.0.0 vs lib/active_archive/base.rb in active_archive-2.0.0

- old
+ new

@@ -29,16 +29,23 @@ end end end alias_method(:archive, :destroy) + alias_method(:archive!, :destroy) + def to_archival + I18n.t("active_archive.archival.#{archived? ? :archived : :unarchived}") + end + def unarchive(validate=nil) with_transaction_returning_status do run_callbacks(:unarchive) { set_archived_at(nil, validate) } self end end + + alias_method(:unarchive!, :unarchive) def unarchived? !archived? end \ No newline at end of file