Wednesday, July 15, 2026 12:54:07 AM
> log_entry.rb
# frozen_string_literal: true

class LogEntry < ApplicationRecord
  before_create :generate_uuid

  attribute :uuid, :uuid
  attribute :log_id, :integer
  attribute :file_name, :string
  attribute :entries, :json

  # V1
  attribute :log_date, :datetime, default: nil

  belongs_to :log

  private

  def generate_uuid
    self.uuid = SecureRandom.uuid
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7