summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-27 13:23:40 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-27 13:23:40 +0000
commit47d269c1aa43fc89e8fda65a7f83dbb062c9beea (patch)
tree1a18182a71f065d07bd2c12b4f0406c6badcf6db /config
parentc01ff1f54b55a60f7c7473d0d8a429d5cf9c1609 (diff)
parent702380f1aed9d20cc48d24164e4910613ec18703 (diff)
downloadgitlab-ce-47d269c1aa43fc89e8fda65a7f83dbb062c9beea.tar.gz
Merge branch 'rs-letter_opener_web' into 'master'
Add letter_opener_web gem Sent emails in the development environment will no longer automatically be opened in the browser. If a sent email needs to be viewed, it can be found at the `/rails/letter_opener` route. See merge request !3893
Diffstat (limited to 'config')
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/routes.rb10
2 files changed, 7 insertions, 5 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 689694a3480..4f39016bfa4 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -36,7 +36,7 @@ Rails.application.configure do
# For having correct urls in mails
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
# Open sent mails in browser
- config.action_mailer.delivery_method = :letter_opener
+ config.action_mailer.delivery_method = :letter_opener_web
# Don't make a mess when bootstrapping a development environment
config.action_mailer.perform_deliveries = (ENV['BOOTSTRAP'] != '1')
diff --git a/config/routes.rb b/config/routes.rb
index 2f820aafed1..d664434e1a6 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,16 +16,18 @@ Rails.application.routes.draw do
end
end
- # Make the built-in Rails routes available in development, otherwise they'd
- # get swallowed by the `namespace/project` route matcher below.
- #
- # See https://git.io/va79N
if Rails.env.development?
+ # Make the built-in Rails routes available in development, otherwise they'd
+ # get swallowed by the `namespace/project` route matcher below.
+ #
+ # See https://git.io/va79N
get '/rails/mailers' => 'rails/mailers#index'
get '/rails/mailers/:path' => 'rails/mailers#preview'
get '/rails/info/properties' => 'rails/info#properties'
get '/rails/info/routes' => 'rails/info#routes'
get '/rails/info' => 'rails/info#index'
+
+ mount LetterOpenerWeb::Engine, at: '/rails/letter_opener'
end
namespace :ci do