mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 23:06:22 +00:00
poder reenviar formularios desde la consola
This commit is contained in:
parent
1911e4f4d4
commit
b16250059a
3 changed files with 18 additions and 7 deletions
|
@ -7,4 +7,16 @@ class LogEntry < ApplicationRecord
|
|||
serialize :text, JSON
|
||||
|
||||
default_scope -> { order(created_at: :desc) }
|
||||
|
||||
def resend
|
||||
return if sent
|
||||
|
||||
ContactJob.perform_async site_id: site_id,
|
||||
form_name: params[:form],
|
||||
form: params
|
||||
end
|
||||
|
||||
def params
|
||||
@params ||= text&.dig('params')&.symbolize_keys
|
||||
end
|
||||
end
|
||||
|
|
5
db/migrate/20200820165316_add_sent_to_log_entries.rb
Normal file
5
db/migrate/20200820165316_add_sent_to_log_entries.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddSentToLogEntries < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :log_entries, :sent, :boolean, default: false
|
||||
end
|
||||
end
|
|
@ -10,10 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20_200_811_210_507) do
|
||||
# Could not dump table "access_logs" because of following StandardError
|
||||
# Unknown type '' for column 'id'
|
||||
|
||||
ActiveRecord::Schema.define(version: 20_200_816_003_344) do
|
||||
create_table 'action_text_rich_texts', force: :cascade do |t|
|
||||
t.string 'name', null: false
|
||||
t.text 'body'
|
||||
|
@ -56,9 +53,6 @@ ActiveRecord::Schema.define(version: 20_200_811_210_507) do
|
|||
t.index ['deploy_id'], name: 'index_build_stats_on_deploy_id'
|
||||
end
|
||||
|
||||
# Could not dump table "csp_reports" because of following StandardError
|
||||
# Unknown type 'uuid' for column 'id'
|
||||
|
||||
create_table 'deploys', force: :cascade do |t|
|
||||
t.datetime 'created_at', null: false
|
||||
t.datetime 'updated_at', null: false
|
||||
|
|
Loading…
Reference in a new issue