diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-28 11:32:44 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-28 11:32:44 -0700 |
commit | 5ad0813322820a6c42d7b3074531ac40108bfb69 (patch) | |
tree | 59a3e850d507daa7028600fb94c551e6aaf93eb9 /app/controllers | |
parent | c9d8f6650d6c5c88c5346032b23d037cf3e4aae6 (diff) | |
download | rails-5ad0813322820a6c42d7b3074531ac40108bfb69.tar.gz rails-5ad0813322820a6c42d7b3074531ac40108bfb69.tar.bz2 rails-5ad0813322820a6c42d7b3074531ac40108bfb69.zip |
Add rerouting option
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/rails/conductor/action_mailroom/reroutes_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/rails/conductor/action_mailroom/reroutes_controller.rb b/app/controllers/rails/conductor/action_mailroom/reroutes_controller.rb new file mode 100644 index 0000000000..028ed9e2d6 --- /dev/null +++ b/app/controllers/rails/conductor/action_mailroom/reroutes_controller.rb @@ -0,0 +1,14 @@ +class Rails::Conductor::ActionMailroom::ReroutesController < Rails::Conductor::BaseController + def create + inbound_email = ActionMailroom::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 |