Cattura periodica client-side (con consenso), storage ActiveStorage e overlay allineato all’immagine. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
365 B
Ruby
13 lines
365 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AnalyticsPageSnapshot < ApplicationRecord
|
|
self.table_name = "analytics_page_snapshots"
|
|
|
|
has_one_attached :image
|
|
|
|
validates :page_path, presence: true
|
|
validates :device, inclusion: { in: AnalyticsEvent::DEVICES }
|
|
validates :width, :height, numericality: { greater_than: 0 }
|
|
validates :captured_at, presence: true
|
|
end
|