Sha256: e323354794f28afedf7483eab62d937198a3050bb75fccd7d00997c7cd6bb86d
Contents?: true
Size: 575 Bytes
Versions: 15
Compression:
Stored size: 575 Bytes
Contents
module Activities class ArticleObserver < Activities::Logger observe :article logs_activity :attributes => [ :title, :type ] do |log| log.revised :if => [:save_version?, {:not => :new_record?}] log.published :if => [:published_at_changed?, :published?] log.unpublished :if => [:published_at_changed?, {:not => :published?}] end def initialize_activity(record) super.tap do |activity| activity.site = record.site activity.section = record.section activity.author = record.author end end end end
Version data entries
15 entries across 15 versions & 2 rubygems