lib/archiveable.rb in archiveable-0.0.3 vs lib/archiveable.rb in archiveable-0.0.5

- old
+ new

@@ -23,6 +23,22 @@ end def archived=(value) self.archived_at = value ? Time.now : nil end + + def archive + update archived: true + end + + def archive! + update! archived: true + end + + def publish + update archived: false + end + + def publish! + update! archived: false + end end