aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-12-26 16:18:42 -0500
committerGeorge Claghorn <george@basecamp.com>2018-12-26 16:18:42 -0500
commit6c168aaffb37c62dee6c895a22e240e5552be669 (patch)
treeb081b79a1088d9bc2bad0ee9f85fd4d7e5cc3638 /actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
parent11a8ba12723c919397c8ccc0b4cf2e9f50da99ed (diff)
downloadrails-6c168aaffb37c62dee6c895a22e240e5552be669.tar.gz
rails-6c168aaffb37c62dee6c895a22e240e5552be669.tar.bz2
rails-6c168aaffb37c62dee6c895a22e240e5552be669.zip
Nest Action Mailbox classes in the API docs
Diffstat (limited to 'actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb')
-rw-r--r--actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb b/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
index c53203049b..05b1ca9a39 100644
--- a/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
+++ b/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb
@@ -1,17 +1,19 @@
# frozen_string_literal: true
-# Rerouting will run routing and processing on an email that has already been, or attempted to be, processed.
-class Rails::Conductor::ActionMailbox::ReroutesController < Rails::Conductor::BaseController
- def create
- inbound_email = ActionMailbox::InboundEmail.find(params[:inbound_email_id])
- reroute inbound_email
+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
+ 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