pg_rails 7.0.8.pre.alpha.56 → 7.0.8.pre.alpha.58

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7a80ab1d7122dd57f2e7a7d22a28c8c276bcaafd69da7cbf662ce630420fde9
4
- data.tar.gz: 7f28e94ae447b35715c01dfa3c130db7bdc5ab2972a10f30e082fc6edd0fb60d
3
+ metadata.gz: 418b790d06e3fdd8000b1722d68c479728e29eca73c1181544cf9241aed5745a
4
+ data.tar.gz: ec5ae58ada69aacb782c37374051022747b41049bd8cdd4824dac3f278a92325
5
5
  SHA512:
6
- metadata.gz: 17bfb418de01d503c8e66bba436a31bf0d807396336e343f3bc202aef3ecadd665227329023b9b5d5f244b6be66ba7f6cadb44cafba90e8b706ee33b1461882e
7
- data.tar.gz: f2cc161384fb6316203459232f9ccb97b6b3c2f5832cc4a143ee5f27fb460da8247f0046ba5b470659d54beb62c463d5bfaa905c9fd7e5a4093a7e3402207943
6
+ metadata.gz: e2b01bcb36204063d7374404571501f387adeec187364b16b014e9d81f20ed892ffc576af1cb69e967bef31008a90f197e412e6760ce02f493610b0ae8fe5eac
7
+ data.tar.gz: edfa1fbf40e2846af7c980f1bcbac849af13fe22ba5e4632ae7473795527a3da4b606f7e722d0dfc921017b71409f22010a79612bbcc34b7c137aa0815e51176
@@ -1,4 +1,6 @@
1
1
  ActiveAdmin.register Audited::Audit do
2
+ actions :index, :show
3
+
2
4
  permit_params %i[auditable_id auditable_type associated_id associated_type user_id
3
5
  user_type username action audited_changes version comment
4
6
  remote_address request_uuid created_at]
@@ -0,0 +1,22 @@
1
+ ActiveAdmin.register Email do
2
+ actions :index, :show
3
+ index do
4
+ selectable_column
5
+ id_column
6
+ column :from_address
7
+ column :to
8
+ column :subject
9
+ column :body_input
10
+ column :tags
11
+ column :associated
12
+ column :status
13
+ actions
14
+ end
15
+
16
+ filter :from_address
17
+ filter :to
18
+ filter :tags
19
+ filter :message_id
20
+ filter :mailer
21
+ filter :status
22
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # generado con pg_rails
4
+
5
+ module Admin
6
+ class EmailsController < AdminController
7
+ include PgEngine::Resource
8
+
9
+ before_action { @clase_modelo = Email }
10
+
11
+ before_action(only: :index) { authorize Email }
12
+
13
+ before_action :set_instancia_modelo, only: %i[new create show edit update destroy]
14
+
15
+ add_breadcrumb Email.nombre_plural, :admin_emails_path
16
+
17
+ private
18
+
19
+ def atributos_permitidos
20
+ %i[from_address from_name reply_to to subject body_input associated_id associated_type]
21
+ end
22
+
23
+ def atributos_para_buscar
24
+ %i[accepted_at delivered_at opened_at from_address from_name reply_to to subject body_input tags
25
+ message_id mailer status_detail status]
26
+ end
27
+
28
+ def atributos_para_listar
29
+ %i[from_address to subject body_input tags associated status]
30
+ end
31
+
32
+ def atributos_para_mostrar
33
+ %i[message_id status status_detail accepted_at delivered_at opened_at from_address
34
+ from_name reply_to to subject body_input tags associated mailer encoded_eml_link]
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # generado con pg_rails
4
+
5
+ class EmailDecorator < PgEngine::BaseDecorator
6
+ delegate_all
7
+
8
+ # Define presentation-specific methods here. Helpers are accessed through
9
+ # `helpers` (aka `h`). You can override attributes, for example:
10
+ #
11
+ # def created_at
12
+ # helpers.content_tag :span, class: 'time' do
13
+ # object.created_at.strftime("%a %m/%d/%y")
14
+ # end
15
+ # end
16
+
17
+ def encoded_eml_link
18
+ return if object.encoded_eml.blank?
19
+
20
+ link_to 'Download', helpers.rails_blob_path(object.encoded_eml), target: :_blank, rel: :noopener
21
+ end
22
+ end
@@ -0,0 +1,40 @@
1
+ module PgEngine
2
+ class BaseMailer < ActionMailer::Base # rubocop:disable Rails/ApplicationMailer
3
+ class MailNotDelivered < StandardError; end
4
+
5
+ before_action { @email = params[:email] }
6
+
7
+ default from: -> { email_address_with_name(@email.from_address, @email.from_name) },
8
+ reply_to: -> { @email.reply_to },
9
+ subject: -> { @email.subject },
10
+ to: -> { @email.to }
11
+
12
+ layout 'pg_layout/mailer'
13
+
14
+ # default delivery_method: :smtp
15
+
16
+ # TODO: rescue from StandardError? from PgEngine::Error?
17
+
18
+ rescue_from MailNotDelivered do |err|
19
+ # FIXME: marcar el Email en la DB como fallido
20
+ pg_err err
21
+ end
22
+
23
+ protected
24
+
25
+ def mail(*args)
26
+ super(*args).tap do |message|
27
+ # message.mailgun_options = {
28
+ # 'tag' => email.tags,
29
+ # 'tracking-opens' => true
30
+ # }
31
+ message['email'] = @email
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ # # TODO: testear
38
+ # si from está vacío
39
+ # si body está vacío
40
+ # si se lanza PgEngine::BaseMailer::MailNotDelivered
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # == Schema Information
4
+ #
5
+ # Table name: emails
6
+ #
7
+ # id :bigint not null, primary key
8
+ # accepted_at :datetime
9
+ # associated_type :string indexed => [associated_id]
10
+ # body_input :string
11
+ # delivered_at :datetime
12
+ # from_address :string not null
13
+ # from_name :string
14
+ # mailer :string
15
+ # opened_at :datetime
16
+ # reply_to :string
17
+ # status :integer default("pending"), not null
18
+ # status_detail :string
19
+ # subject :string
20
+ # tags :string is an Array
21
+ # to :string not null
22
+ # created_at :datetime not null
23
+ # updated_at :datetime not null
24
+ # actualizado_por_id :bigint indexed
25
+ # associated_id :bigint indexed => [associated_type]
26
+ # creado_por_id :bigint indexed
27
+ # message_id :string
28
+ #
29
+ # Foreign Keys
30
+ #
31
+ # fk_rails_... (actualizado_por_id => users.id)
32
+ # fk_rails_... (creado_por_id => users.id)
33
+ #
34
+
35
+ class Email < ApplicationRecord
36
+ audited
37
+
38
+ has_one_attached :encoded_eml
39
+
40
+ belongs_to :associated, polymorphic: true, optional: true
41
+
42
+ belongs_to :creado_por, optional: true, class_name: 'User'
43
+ belongs_to :actualizado_por, optional: true, class_name: 'User'
44
+
45
+ kredis_unique_list :logs
46
+
47
+ # TODO: y el fallido temporario?
48
+ enumerize :status, in: { pending: 0, blocked: 1, sent: 2, accepted: 3, delivered: 4, rejected: 5 }
49
+
50
+ validates :from_address, :to, :status, presence: true
51
+
52
+ validate do
53
+ if to.present? && !to.split(/[,;]/).all? { |dest| dest.match(/\A[^@\s]+@[^@\s]+\z/) }
54
+ # FIXME: testear
55
+ errors.add(:to, 'no es válido')
56
+ end
57
+ end
58
+
59
+ validates :subject, length: { within: 0..200 }
60
+ validates :from_name, length: { within: 0..80 }
61
+ validates :to, length: { within: 3..200 }
62
+
63
+ validates :from_name, :subject, :to,
64
+ format: { with: /\A[^\n<>&]*\z/, message: 'contiene caracteres inválidos' }
65
+
66
+ after_initialize do
67
+ self.from_address = ENV.fetch('DEFAULT_MAIL_FROM') if from_address.blank?
68
+ end
69
+
70
+ # validates_format_of :subject, with: /\A[[[:alpha:]]\(\)\w\s.,;!¡?¿-]+\z/
71
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ # generado con pg_rails
4
+
5
+ class EmailPolicy < ApplicationPolicy
6
+ class Scope < ApplicationPolicy::Scope
7
+ # def resolve
8
+ # if policy.acceso_total?
9
+ # scope.all
10
+ # else
11
+ # scope.none
12
+ # end
13
+ # end
14
+ end
15
+
16
+ # def puede_editar?
17
+ # acceso_total? && !record.readonly?
18
+ # end
19
+
20
+ # def puede_crear?
21
+ # acceso_total? || user.asesor?
22
+ # end
23
+
24
+ # def puede_borrar?
25
+ # acceso_total? && !record.readonly?
26
+ # end
27
+
28
+ # def acceso_total?
29
+ # user.developer?
30
+ # end
31
+ end
@@ -0,0 +1,16 @@
1
+ / # locals: (object: nil, asociable: false)
2
+
3
+ div style="max-width: 22em" data-controller="pg_form"
4
+ = pg_form_for(@email || object, asociable:) do |f|
5
+ = f.mensajes_de_error
6
+
7
+ = hidden_field_tag :asociable, true if asociable
8
+ = f.input :from_address
9
+ = f.input :from_name
10
+ = f.input :reply_to
11
+ = f.input :to
12
+ = f.input :subject
13
+ = f.input :body_input, as: :text
14
+
15
+ .mt-2
16
+ = f.button :submit
@@ -0,0 +1,29 @@
1
+ - content_for :title do
2
+ = @email.to_s
3
+ - content_for :actions do
4
+ = @email.destroy_link_redirect
5
+ .ms-1
6
+ = @email.edit_link
7
+
8
+ table.table.table-borderless.table-sm.w-auto.mb-0.m-3
9
+ - atributos_para_mostrar.each do |att|
10
+ tr
11
+ th = @clase_modelo.human_attribute_name(att)
12
+ td = @email.send(att)
13
+ tr
14
+ th = t('attributes.creado_por')
15
+ td = @email.creado_por
16
+ tr
17
+ th = t('attributes.created_at')
18
+ td = @email.created_at
19
+ tr
20
+ th = t('attributes.actualizado_por')
21
+ td = @email.actualizado_por
22
+ tr
23
+ th = t('attributes.updated_at')
24
+ td = @email.updated_at
25
+
26
+ h4 Logs
27
+ - @email.logs.to_a.each do |log|
28
+ - json = JSON.parse(log)
29
+ p = json['event']
@@ -19,3 +19,5 @@ ActionMailer::MailDeliveryJob.rescue_from EOFError,
19
19
  OpenSSL::SSL::SSLError do |e|
20
20
  raise MailDeliveryTemporalError, e
21
21
  end
22
+
23
+ ActionMailer::Base.register_observer(PgEngine::EmailObserver)
@@ -9,6 +9,7 @@ Rails.application.routes.draw do
9
9
  registrations: 'users/registrations'
10
10
  }
11
11
  namespace :admin, path: 'a' do
12
+ pg_resource(:emails)
12
13
  pg_resource(:users)
13
14
  pg_resource(:accounts)
14
15
  pg_resource(:user_accounts)
@@ -16,3 +17,211 @@ Rails.application.routes.draw do
16
17
  end
17
18
  ActiveAdmin.routes(self)
18
19
  end
20
+
21
+ # Prefix Verb URI Pattern Controller#Action
22
+ # abrir_modal_frontend_cosas GET /frontend/cosas/abrir_modal(.:format) frontend/cosas#abrir_modal
23
+ # buscar_frontend_cosas POST /frontend/cosas/buscar(.:format) frontend/cosas#buscar
24
+ # frontend_cosas GET /frontend/cosas(.:format) frontend/cosas#index
25
+ # POST /frontend/cosas(.:format) frontend/cosas#create
26
+ # new_frontend_cosa GET /frontend/cosas/new(.:format) frontend/cosas#new
27
+ # edit_frontend_cosa GET /frontend/cosas/:id/edit(.:format) frontend/cosas#edit
28
+ # frontend_cosa GET /frontend/cosas/:id(.:format) frontend/cosas#show
29
+ # PATCH /frontend/cosas/:id(.:format) frontend/cosas#update
30
+ # PUT /frontend/cosas/:id(.:format) frontend/cosas#update
31
+ # DELETE /frontend/cosas/:id(.:format) frontend/cosas#destroy
32
+ # abrir_modal_frontend_categoria_de_cosas GET /frontend/categoria_de_cosas/abrir_modal(.:format) frontend/categoria_de_cosas#abrir_modal
33
+ # buscar_frontend_categoria_de_cosas POST /frontend/categoria_de_cosas/buscar(.:format) frontend/categoria_de_cosas#buscar
34
+ # frontend_categoria_de_cosas GET /frontend/categoria_de_cosas(.:format) frontend/categoria_de_cosas#index
35
+ # POST /frontend/categoria_de_cosas(.:format) frontend/categoria_de_cosas#create
36
+ # new_frontend_categoria_de_cosa GET /frontend/categoria_de_cosas/new(.:format) frontend/categoria_de_cosas#new
37
+ # edit_frontend_categoria_de_cosa GET /frontend/categoria_de_cosas/:id/edit(.:format) frontend/categoria_de_cosas#edit
38
+ # frontend_categoria_de_cosa GET /frontend/categoria_de_cosas/:id(.:format) frontend/categoria_de_cosas#show
39
+ # PATCH /frontend/categoria_de_cosas/:id(.:format) frontend/categoria_de_cosas#update
40
+ # PUT /frontend/categoria_de_cosas/:id(.:format) frontend/categoria_de_cosas#update
41
+ # DELETE /frontend/categoria_de_cosas/:id(.:format) frontend/categoria_de_cosas#destroy
42
+ # abrir_modal_admin_cosas GET /admin/cosas/abrir_modal(.:format) admin/cosas#abrir_modal
43
+ # buscar_admin_cosas POST /admin/cosas/buscar(.:format) admin/cosas#buscar
44
+ # admin_cosas GET /admin/cosas(.:format) admin/cosas#index
45
+ # POST /admin/cosas(.:format) admin/cosas#create
46
+ # new_admin_cosa GET /admin/cosas/new(.:format) admin/cosas#new
47
+ # edit_admin_cosa GET /admin/cosas/:id/edit(.:format) admin/cosas#edit
48
+ # admin_cosa GET /admin/cosas/:id(.:format) admin/cosas#show
49
+ # PATCH /admin/cosas/:id(.:format) admin/cosas#update
50
+ # PUT /admin/cosas/:id(.:format) admin/cosas#update
51
+ # DELETE /admin/cosas/:id(.:format) admin/cosas#destroy
52
+ # abrir_modal_admin_categoria_de_cosas GET /admin/categoria_de_cosas/abrir_modal(.:format) admin/categoria_de_cosas#abrir_modal
53
+ # buscar_admin_categoria_de_cosas POST /admin/categoria_de_cosas/buscar(.:format) admin/categoria_de_cosas#buscar
54
+ # admin_categoria_de_cosas GET /admin/categoria_de_cosas(.:format) admin/categoria_de_cosas#index
55
+ # POST /admin/categoria_de_cosas(.:format) admin/categoria_de_cosas#create
56
+ # new_admin_categoria_de_cosa GET /admin/categoria_de_cosas/new(.:format) admin/categoria_de_cosas#new
57
+ # edit_admin_categoria_de_cosa GET /admin/categoria_de_cosas/:id/edit(.:format) admin/categoria_de_cosas#edit
58
+ # admin_categoria_de_cosa GET /admin/categoria_de_cosas/:id(.:format) admin/categoria_de_cosas#show
59
+ # PATCH /admin/categoria_de_cosas/:id(.:format) admin/categoria_de_cosas#update
60
+ # PUT /admin/categoria_de_cosas/:id(.:format) admin/categoria_de_cosas#update
61
+ # DELETE /admin/categoria_de_cosas/:id(.:format) admin/categoria_de_cosas#destroy
62
+ # root GET / admin/categoria_de_cosas#index
63
+ # action_with_redirect GET /action_with_redirect(.:format) dummy_base#action_with_redirect
64
+ # check_dev_user GET /check_dev_user(.:format) dummy_base#check_dev_user
65
+ # test_not_authorized GET /test_not_authorized(.:format) dummy_base#test_not_authorized
66
+ # test_internal_error GET /test_internal_error(.:format) dummy_base#test_internal_error
67
+ # turbo_recede_historical_location GET /recede_historical_location(.:format) turbo/native/navigation#recede
68
+ # turbo_resume_historical_location GET /resume_historical_location(.:format) turbo/native/navigation#resume
69
+ # turbo_refresh_historical_location GET /refresh_historical_location(.:format) turbo/native/navigation#refresh
70
+ # abrir_modal_public_mensaje_contactos GET /contacto/abrir_modal(.:format) public/mensaje_contactos#abrir_modal
71
+ # buscar_public_mensaje_contactos POST /contacto/buscar(.:format) public/mensaje_contactos#buscar
72
+ # public_mensaje_contactos POST /contacto(.:format) public/mensaje_contactos#create
73
+ # new_public_mensaje_contacto GET /contacto/new(.:format) public/mensaje_contactos#new
74
+ # new_user_session GET /users/sign_in(.:format) devise/sessions#new
75
+ # user_session POST /users/sign_in(.:format) devise/sessions#create
76
+ # destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
77
+ # new_user_password GET /users/password/new(.:format) devise/passwords#new
78
+ # edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
79
+ # user_password PATCH /users/password(.:format) devise/passwords#update
80
+ # PUT /users/password(.:format) devise/passwords#update
81
+ # POST /users/password(.:format) devise/passwords#create
82
+ # cancel_user_registration GET /users/cancel(.:format) users/registrations#cancel
83
+ # new_user_registration GET /users/sign_up(.:format) users/registrations#new
84
+ # edit_user_registration GET /users/edit(.:format) users/registrations#edit
85
+ # user_registration PATCH /users(.:format) users/registrations#update
86
+ # PUT /users(.:format) users/registrations#update
87
+ # DELETE /users(.:format) users/registrations#destroy
88
+ # POST /users(.:format) users/registrations#create
89
+ # new_user_confirmation GET /users/confirmation/new(.:format) users/confirmations#new
90
+ # user_confirmation GET /users/confirmation(.:format) users/confirmations#show
91
+ # POST /users/confirmation(.:format) users/confirmations#create
92
+ # new_user_unlock GET /users/unlock/new(.:format) devise/unlocks#new
93
+ # user_unlock GET /users/unlock(.:format) devise/unlocks#show
94
+ # POST /users/unlock(.:format) devise/unlocks#create
95
+ # abrir_modal_admin_emails GET /a/emails/abrir_modal(.:format) admin/emails#abrir_modal
96
+ # buscar_admin_emails POST /a/emails/buscar(.:format) admin/emails#buscar
97
+ # admin_emails GET /a/emails(.:format) admin/emails#index
98
+ # POST /a/emails(.:format) admin/emails#create
99
+ # new_admin_email GET /a/emails/new(.:format) admin/emails#new
100
+ # edit_admin_email GET /a/emails/:id/edit(.:format) admin/emails#edit
101
+ # admin_email GET /a/emails/:id(.:format) admin/emails#show
102
+ # PATCH /a/emails/:id(.:format) admin/emails#update
103
+ # PUT /a/emails/:id(.:format) admin/emails#update
104
+ # DELETE /a/emails/:id(.:format) admin/emails#destroy
105
+ # abrir_modal_admin_users GET /a/users/abrir_modal(.:format) admin/users#abrir_modal
106
+ # buscar_admin_users POST /a/users/buscar(.:format) admin/users#buscar
107
+ # admin_users GET /a/users(.:format) admin/users#index
108
+ # POST /a/users(.:format) admin/users#create
109
+ # new_admin_user GET /a/users/new(.:format) admin/users#new
110
+ # edit_admin_user GET /a/users/:id/edit(.:format) admin/users#edit
111
+ # admin_user GET /a/users/:id(.:format) admin/users#show
112
+ # PATCH /a/users/:id(.:format) admin/users#update
113
+ # PUT /a/users/:id(.:format) admin/users#update
114
+ # DELETE /a/users/:id(.:format) admin/users#destroy
115
+ # abrir_modal_admin_accounts GET /a/accounts/abrir_modal(.:format) admin/accounts#abrir_modal
116
+ # buscar_admin_accounts POST /a/accounts/buscar(.:format) admin/accounts#buscar
117
+ # admin_accounts GET /a/accounts(.:format) admin/accounts#index
118
+ # POST /a/accounts(.:format) admin/accounts#create
119
+ # new_admin_account GET /a/accounts/new(.:format) admin/accounts#new
120
+ # edit_admin_account GET /a/accounts/:id/edit(.:format) admin/accounts#edit
121
+ # admin_account GET /a/accounts/:id(.:format) admin/accounts#show
122
+ # PATCH /a/accounts/:id(.:format) admin/accounts#update
123
+ # PUT /a/accounts/:id(.:format) admin/accounts#update
124
+ # DELETE /a/accounts/:id(.:format) admin/accounts#destroy
125
+ # abrir_modal_admin_user_accounts GET /a/user_accounts/abrir_modal(.:format) admin/user_accounts#abrir_modal
126
+ # buscar_admin_user_accounts POST /a/user_accounts/buscar(.:format) admin/user_accounts#buscar
127
+ # admin_user_accounts GET /a/user_accounts(.:format) admin/user_accounts#index
128
+ # POST /a/user_accounts(.:format) admin/user_accounts#create
129
+ # new_admin_user_account GET /a/user_accounts/new(.:format) admin/user_accounts#new
130
+ # edit_admin_user_account GET /a/user_accounts/:id/edit(.:format) admin/user_accounts#edit
131
+ # admin_user_account GET /a/user_accounts/:id(.:format) admin/user_accounts#show
132
+ # PATCH /a/user_accounts/:id(.:format) admin/user_accounts#update
133
+ # PUT /a/user_accounts/:id(.:format) admin/user_accounts#update
134
+ # DELETE /a/user_accounts/:id(.:format) admin/user_accounts#destroy
135
+ # admin_login_as GET /a/login_as(.:format) admin/users#login_as
136
+ # active_admin_root GET /active_admin(.:format) active_admin/dashboard#index
137
+ # batch_action_active_admin_categoria_de_cosas POST /active_admin/categoria_de_cosas/batch_action(.:format) active_admin/categoria_de_cosas#batch_action
138
+ # active_admin_categoria_de_cosas GET /active_admin/categoria_de_cosas(.:format) active_admin/categoria_de_cosas#index
139
+ # POST /active_admin/categoria_de_cosas(.:format) active_admin/categoria_de_cosas#create
140
+ # new_active_admin_categoria_de_cosa GET /active_admin/categoria_de_cosas/new(.:format) active_admin/categoria_de_cosas#new
141
+ # edit_active_admin_categoria_de_cosa GET /active_admin/categoria_de_cosas/:id/edit(.:format) active_admin/categoria_de_cosas#edit
142
+ # active_admin_categoria_de_cosa GET /active_admin/categoria_de_cosas/:id(.:format) active_admin/categoria_de_cosas#show
143
+ # PATCH /active_admin/categoria_de_cosas/:id(.:format) active_admin/categoria_de_cosas#update
144
+ # PUT /active_admin/categoria_de_cosas/:id(.:format) active_admin/categoria_de_cosas#update
145
+ # DELETE /active_admin/categoria_de_cosas/:id(.:format) active_admin/categoria_de_cosas#destroy
146
+ # batch_action_active_admin_cosas POST /active_admin/cosas/batch_action(.:format) active_admin/cosas#batch_action
147
+ # active_admin_cosas GET /active_admin/cosas(.:format) active_admin/cosas#index
148
+ # POST /active_admin/cosas(.:format) active_admin/cosas#create
149
+ # new_active_admin_cosa GET /active_admin/cosas/new(.:format) active_admin/cosas#new
150
+ # edit_active_admin_cosa GET /active_admin/cosas/:id/edit(.:format) active_admin/cosas#edit
151
+ # active_admin_cosa GET /active_admin/cosas/:id(.:format) active_admin/cosas#show
152
+ # PATCH /active_admin/cosas/:id(.:format) active_admin/cosas#update
153
+ # PUT /active_admin/cosas/:id(.:format) active_admin/cosas#update
154
+ # DELETE /active_admin/cosas/:id(.:format) active_admin/cosas#destroy
155
+ # batch_action_active_admin_accounts POST /active_admin/accounts/batch_action(.:format) active_admin/accounts#batch_action
156
+ # active_admin_accounts GET /active_admin/accounts(.:format) active_admin/accounts#index
157
+ # POST /active_admin/accounts(.:format) active_admin/accounts#create
158
+ # new_active_admin_account GET /active_admin/accounts/new(.:format) active_admin/accounts#new
159
+ # edit_active_admin_account GET /active_admin/accounts/:id/edit(.:format) active_admin/accounts#edit
160
+ # active_admin_account GET /active_admin/accounts/:id(.:format) active_admin/accounts#show
161
+ # PATCH /active_admin/accounts/:id(.:format) active_admin/accounts#update
162
+ # PUT /active_admin/accounts/:id(.:format) active_admin/accounts#update
163
+ # DELETE /active_admin/accounts/:id(.:format) active_admin/accounts#destroy
164
+ # batch_action_active_admin_audited_audits POST /active_admin/audited_audits/batch_action(.:format) active_admin/audited_audits#batch_action
165
+ # active_admin_audited_audits GET /active_admin/audited_audits(.:format) active_admin/audited_audits#index
166
+ # active_admin_audited_audit GET /active_admin/audited_audits/:id(.:format) active_admin/audited_audits#show
167
+ # active_admin_dashboard GET /active_admin/dashboard(.:format) active_admin/dashboard#index
168
+ # batch_action_active_admin_emails POST /active_admin/emails/batch_action(.:format) active_admin/emails#batch_action
169
+ # active_admin_emails GET /active_admin/emails(.:format) active_admin/emails#index
170
+ # active_admin_email GET /active_admin/emails/:id(.:format) active_admin/emails#show
171
+ # batch_action_active_admin_mensaje_contactos POST /active_admin/mensaje_contactos/batch_action(.:format) active_admin/mensaje_contactos#batch_action
172
+ # active_admin_mensaje_contactos GET /active_admin/mensaje_contactos(.:format) active_admin/mensaje_contactos#index
173
+ # POST /active_admin/mensaje_contactos(.:format) active_admin/mensaje_contactos#create
174
+ # new_active_admin_mensaje_contacto GET /active_admin/mensaje_contactos/new(.:format) active_admin/mensaje_contactos#new
175
+ # edit_active_admin_mensaje_contacto GET /active_admin/mensaje_contactos/:id/edit(.:format) active_admin/mensaje_contactos#edit
176
+ # active_admin_mensaje_contacto GET /active_admin/mensaje_contactos/:id(.:format) active_admin/mensaje_contactos#show
177
+ # PATCH /active_admin/mensaje_contactos/:id(.:format) active_admin/mensaje_contactos#update
178
+ # PUT /active_admin/mensaje_contactos/:id(.:format) active_admin/mensaje_contactos#update
179
+ # DELETE /active_admin/mensaje_contactos/:id(.:format) active_admin/mensaje_contactos#destroy
180
+ # batch_action_active_admin_user_accounts POST /active_admin/user_accounts/batch_action(.:format) active_admin/user_accounts#batch_action
181
+ # active_admin_user_accounts GET /active_admin/user_accounts(.:format) active_admin/user_accounts#index
182
+ # POST /active_admin/user_accounts(.:format) active_admin/user_accounts#create
183
+ # new_active_admin_user_account GET /active_admin/user_accounts/new(.:format) active_admin/user_accounts#new
184
+ # edit_active_admin_user_account GET /active_admin/user_accounts/:id/edit(.:format) active_admin/user_accounts#edit
185
+ # active_admin_user_account GET /active_admin/user_accounts/:id(.:format) active_admin/user_accounts#show
186
+ # PATCH /active_admin/user_accounts/:id(.:format) active_admin/user_accounts#update
187
+ # PUT /active_admin/user_accounts/:id(.:format) active_admin/user_accounts#update
188
+ # DELETE /active_admin/user_accounts/:id(.:format) active_admin/user_accounts#destroy
189
+ # confirm_active_admin_user PUT /active_admin/users/:id/confirm(.:format) active_admin/users#confirm
190
+ # discard_active_admin_user PUT /active_admin/users/:id/discard(.:format) active_admin/users#discard
191
+ # restore_active_admin_user PUT /active_admin/users/:id/restore(.:format) active_admin/users#restore
192
+ # batch_action_active_admin_users POST /active_admin/users/batch_action(.:format) active_admin/users#batch_action
193
+ # active_admin_users GET /active_admin/users(.:format) active_admin/users#index
194
+ # POST /active_admin/users(.:format) active_admin/users#create
195
+ # new_active_admin_user GET /active_admin/users/new(.:format) active_admin/users#new
196
+ # edit_active_admin_user GET /active_admin/users/:id/edit(.:format) active_admin/users#edit
197
+ # active_admin_user GET /active_admin/users/:id(.:format) active_admin/users#show
198
+ # PATCH /active_admin/users/:id(.:format) active_admin/users#update
199
+ # PUT /active_admin/users/:id(.:format) active_admin/users#update
200
+ # DELETE /active_admin/users/:id(.:format) active_admin/users#destroy
201
+ # active_admin_comments GET /active_admin/comments(.:format) active_admin/comments#index
202
+ # POST /active_admin/comments(.:format) active_admin/comments#create
203
+ # active_admin_comment GET /active_admin/comments/:id(.:format) active_admin/comments#show
204
+ # DELETE /active_admin/comments/:id(.:format) active_admin/comments#destroy
205
+ # rails_postmark_inbound_emails POST /rails/action_mailbox/postmark/inbound_emails(.:format) action_mailbox/ingresses/postmark/inbound_emails#create
206
+ # rails_relay_inbound_emails POST /rails/action_mailbox/relay/inbound_emails(.:format) action_mailbox/ingresses/relay/inbound_emails#create
207
+ # rails_sendgrid_inbound_emails POST /rails/action_mailbox/sendgrid/inbound_emails(.:format) action_mailbox/ingresses/sendgrid/inbound_emails#create
208
+ # rails_mandrill_inbound_health_check GET /rails/action_mailbox/mandrill/inbound_emails(.:format) action_mailbox/ingresses/mandrill/inbound_emails#health_check
209
+ # rails_mandrill_inbound_emails POST /rails/action_mailbox/mandrill/inbound_emails(.:format) action_mailbox/ingresses/mandrill/inbound_emails#create
210
+ # rails_mailgun_inbound_emails POST /rails/action_mailbox/mailgun/inbound_emails/mime(.:format) action_mailbox/ingresses/mailgun/inbound_emails#create
211
+ # rails_conductor_inbound_emails GET /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#index
212
+ # POST /rails/conductor/action_mailbox/inbound_emails(.:format) rails/conductor/action_mailbox/inbound_emails#create
213
+ # new_rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/new(.:format) rails/conductor/action_mailbox/inbound_emails#new
214
+ # rails_conductor_inbound_email GET /rails/conductor/action_mailbox/inbound_emails/:id(.:format) rails/conductor/action_mailbox/inbound_emails#show
215
+ # new_rails_conductor_inbound_email_source GET /rails/conductor/action_mailbox/inbound_emails/sources/new(.:format) rails/conductor/action_mailbox/inbound_emails/sources#new
216
+ # rails_conductor_inbound_email_sources POST /rails/conductor/action_mailbox/inbound_emails/sources(.:format) rails/conductor/action_mailbox/inbound_emails/sources#create
217
+ # rails_conductor_inbound_email_reroute POST /rails/conductor/action_mailbox/:inbound_email_id/reroute(.:format) rails/conductor/action_mailbox/reroutes#create
218
+ # rails_conductor_inbound_email_incinerate POST /rails/conductor/action_mailbox/:inbound_email_id/incinerate(.:format) rails/conductor/action_mailbox/incinerates#create
219
+ # rails_service_blob GET /rails/active_storage/blobs/redirect/:signed_id/*filename(.:format) active_storage/blobs/redirect#show
220
+ # rails_service_blob_proxy GET /rails/active_storage/blobs/proxy/:signed_id/*filename(.:format) active_storage/blobs/proxy#show
221
+ # GET /rails/active_storage/blobs/:signed_id/*filename(.:format) active_storage/blobs/redirect#show
222
+ # rails_blob_representation GET /rails/active_storage/representations/redirect/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations/redirect#show
223
+ # rails_blob_representation_proxy GET /rails/active_storage/representations/proxy/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations/proxy#show
224
+ # GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format) active_storage/representations/redirect#show
225
+ # rails_disk_service GET /rails/active_storage/disk/:encoded_key/*filename(.:format) active_storage/disk#show
226
+ # update_rails_disk_service PUT /rails/active_storage/disk/:encoded_token(.:format) active_storage/disk#update
227
+ # rails_direct_uploads POST /rails/active_storage/direct_uploads(.:format) active_storage/direct_uploads#create
@@ -0,0 +1,34 @@
1
+ # generado con pg_rails
2
+
3
+ class CreateEmails < ActiveRecord::Migration[7.1]
4
+ def change
5
+ create_table :emails do |t|
6
+ t.datetime :accepted_at
7
+ t.datetime :delivered_at
8
+ t.datetime :opened_at
9
+ t.string :from_address, null: false
10
+ t.string :from_name
11
+ t.string :reply_to
12
+ t.string :to, null: false
13
+ t.string :subject
14
+ t.string :body_input
15
+ t.string :tags, array: true
16
+ t.references :associated, polymorphic: true, index: true
17
+ t.string :message_id
18
+ t.string :mailer
19
+ t.string :status_detail
20
+ t.integer :status, null: false, default: 0
21
+
22
+
23
+ t.references :creado_por, index: true
24
+ t.references :actualizado_por, index: true
25
+
26
+
27
+ t.timestamps
28
+ end
29
+
30
+
31
+ add_foreign_key :emails, :users, column: 'creado_por_id'
32
+ add_foreign_key :emails, :users, column: 'actualizado_por_id'
33
+ end
34
+ end