Sha256: 983c2229349174f8898a1b84b06d9f9636e62fcd93e4d3b5a5ad04d19daf108d
Contents?: true
Size: 886 Bytes
Versions: 36
Compression:
Stored size: 886 Bytes
Contents
# frozen_string_literal: true module EacRailsBase0 class MailerController < ::EacRailsBase0::ApplicationController def info klass = ::ActionMailer::Base @sections = %w[default_params default_url_options smtp_settings].map do |section| ["#{klass}.#{section}", klass.send(section)] end.to_h end def send_test @record = ::EacRailsBase0::EmailSendTest.new end def send_test_submit @record = ::EacRailsBase0::EmailSendTest.new(send_test_submit_params) if @record.save flash[:success] = t('eac_rails_base0.mailer.send_test_successful', address: @record.address) redirect_to action: :send_test else render :send_test end end private def send_test_submit_params params[::EacRailsBase0::EmailSendTest.model_name.param_key].permit(:alternative_address) end end end
Version data entries
36 entries across 36 versions & 1 rubygems