mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 22:26:22 +00:00
20 lines
410 B
Ruby
20 lines
410 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Un registro de cualquier cosa, nos sirve para debuguear
|
|
# selectivamente.
|
|
class LogEntry < ApplicationRecord
|
|
belongs_to :site
|
|
serialize :text, JSON
|
|
|
|
default_scope -> { order(created_at: :desc) }
|
|
|
|
def resend
|
|
return if sent
|
|
|
|
ContactJob.perform_async site_id, params[:form], params
|
|
end
|
|
|
|
def params
|
|
@params ||= text&.dig('params')&.symbolize_keys
|
|
end
|
|
end
|