Sha256: 1542504a46fdf12c04c7fbc1a949a89a6de46c437531ac7f66473a6a3ccf0864

Contents?: true

Size: 585 Bytes

Versions: 113

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

module Rails
  # Rerouting will run routing and processing on an email that has already been, or attempted to be, processed.
  class Conductor::ActionMailbox::ReroutesController < Rails::Conductor::BaseController
    def create
      inbound_email = ActionMailbox::InboundEmail.find(params[:inbound_email_id])
      reroute inbound_email

      redirect_to main_app.rails_conductor_inbound_email_url(inbound_email)
    end

    private
      def reroute(inbound_email)
        inbound_email.pending!
        inbound_email.route_later
      end
  end
end

Version data entries

113 entries across 109 versions & 9 rubygems

Version Path
actionmailbox-7.0.8.6 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-6.1.7.10 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-6.1.7.9 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-7.0.8.5 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionmailbox-7.0.8.4/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionmailbox-7.0.5.1/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionmailbox-7.0.5.1/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionmailbox-7.0.5.1/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-7.0.8.4 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-6.1.7.8 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-7.0.8.1 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-6.1.7.7 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-7.0.2.3/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-6.1.6.1/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-7.0.3.1/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-7.0.8 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-7.0.7.2 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-6.1.7.6 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-7.0.7.1 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
actionmailbox-6.1.7.5 app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb