Sha256: 715ed508955e9a7a2fede634ad7255a86e3d490f40e4b70d4f4e0ec51d626091
Contents?: true
Size: 506 Bytes
Versions: 7
Compression:
Stored size: 506 Bytes
Contents
class Skyline::ArticleVersionObserver < ActiveRecord::Observer attr_accessor :controller def before(controller) self.controller = controller end def after(controller) self.controller = nil end def before_create(article_version) article_version.creator = self.controller.send(:current_user) if self.controller end def before_save(article_version) article_version.last_updated_by = self.controller.send(:current_user) if self.controller end end
Version data entries
7 entries across 7 versions & 2 rubygems