Module: ModelTimeline::Timelineable

Extended by:
ActiveSupport::Concern
Defined in:
lib/model_timeline/timelineable.rb

Overview

Provides timeline tracking functionality for ActiveRecord models. When included in a model, this module allows tracking changes to model attributes over time by creating timeline entries.

Examples:

Basic usage

class User < ApplicationRecord
  has_timeline
end

With custom options

class Product < ApplicationRecord
  has_timeline :product_history,
              only: [:name, :price],
              on: [:update, :destroy]
end