Sha256: e09446a755c7eacb79425c2e5a6590dce54857f9806e89e56a2c694507653d27
Contents?: true
Size: 293 Bytes
Versions: 10
Compression:
Stored size: 293 Bytes
Contents
module Rostra module TimestampObserver def self.included(base) base.after_create :set_active_at end private def set_active_at question = self.is_a?(Rostra::Question) ? self : self.question question.update_attribute(:active_at, Time.now) end end end
Version data entries
10 entries across 10 versions & 1 rubygems