Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove action mailer dependency" #2357

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added app/mailers/.gitkeep
Empty file.
3 changes: 2 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
require File.expand_path('../boot', __FILE__)

# Don't include all of rails, we don't need activerecord or action_mailer
# Don't include all of rails, we don't need activerecord
require "action_controller/railtie"
require "active_model/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"

Expand Down
3 changes: 3 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log

Expand Down
6 changes: 6 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )

# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false

# Enable threaded mode
# config.threadsafe!

Expand All @@ -60,6 +63,9 @@

config.action_controller.asset_host = ENV['GOVUK_ASSET_HOST']

config.action_mailer.default_url_options = { host: Plek.new.find('smartanswers') }
config.action_mailer.delivery_method = :ses

if ENV['RUNNING_ON_HEROKU'].blank?
# Enable JSON-style logging
config.logstasher.enabled = true
Expand Down
5 changes: 5 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false

# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
Expand Down