Sha256: 9d0ee37c3d94e1b219bc7bc26fc5e9c8ed11fe309da760fa980fe03e12b17463
Contents?: true
Size: 629 Bytes
Versions: 17
Compression:
Stored size: 629 Bytes
Contents
module Errdo class ErrorOccurrence < ActiveRecord::Base self.table_name = "#{Errdo.error_name.to_s.singularize}_occurrences" serialize :param_values serialize :cookie_values serialize :header_values belongs_to :error, counter_cache: :occurrence_count belongs_to :experiencer, polymorphic: true after_create :update_last_occurrence after_create :update_last_experiencer private def update_last_occurrence error.update(last_occurred_at: created_at) if error end def update_last_experiencer error.update(last_experiencer: experiencer) if error end end end
Version data entries
17 entries across 17 versions & 1 rubygems