Sha256: 26f64179802020ef4a8fccecc9f7ebe74763298caa8500cd3fac952c6ccc4927

Contents?: true

Size: 1.04 KB

Versions: 20

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

# generado con pg_rails

module Admin
  class EmailLogsController < AdminController
    include PgEngine::Resource

    self.clase_modelo = EmailLog

    before_action do
      @actions = [
        ["Mailgun sync: #{ENV.fetch('MAILGUN_DOMAIN', nil)}", mailgun_sync_admin_email_logs_path, {
          'data-turbo-method': :post, class: 'me-2 btn btn-primary btn-sm'
        }]
      ]
    end

    def mailgun_sync
      @new_items = PgEngine::Mailgun::LogSync.download
      flash[:success] = "#{@new_items.length} nuevos items"

      redirect_to admin_email_logs_path
    end

    private

    def atributos_permitidos
      %i[email_id log_id event log_level severity timestamp message_id]
    end

    def atributos_para_buscar
      %i[email log_id event log_level severity timestamp message_id]
    end

    def atributos_para_listar
      %i[email log_id event log_level severity timestamp message_id]
    end

    def atributos_para_mostrar
      %i[email log_id event log_level severity timestamp message_id]
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
pg_rails-7.6.23 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.22 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.22.pre.3 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.22.pre.2 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.22.pre.1 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.11 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.10 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.9 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.8 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.7 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.6 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.5 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.4 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.3 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.2 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.21.pre.1 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.20 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.19 pg_engine/app/controllers/admin/email_logs_controller.rb
pg_rails-7.6.18 pg_engine/app/controllers/admin/email_logs_controller.rb