5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-28 16:46:21 +00:00
panel/app/models/log_entry.rb
f 482a637207
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: perform_later
2023-04-10 17:33:07 -03:00

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_later site_id, params[:form], params
end
def params
@params ||= text&.dig('params')&.symbolize_keys
end
end