Skip to content

Commit 3a91e72

Browse files
committed
Maybe only for Rails 3?
1 parent 52979e7 commit 3a91e72

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

example_app_generator/generate_action_mailer_specs.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ def comment_lines(path, flag, *args)
2424
end
2525
end
2626
end
27+
28+
if defined?(ActionMailer) && Rails::VERSION::MAJOR < 4
29+
# This will force the loading of ActionMailer settings
30+
ActionMailer::Base.smtp_settings
31+
end
2732
CODE
2833
gsub_file 'config/initializers/action_mailer.rb',
2934
/ExampleApp/,

example_app_generator/spec/support/default_preview_path

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ require_file_stub 'config/environment' do
3232
module ExampleApp
3333
class Application < Rails::Application
3434
config.eager_load = false
35+
config.eager_load_paths.clear if Rails::VERSION::MAJOR < 4
3536

3637
# Don't care if the mailer can't send.
3738
config.action_mailer.raise_delivery_errors = false unless ENV['NO_ACTION_MAILER']

0 commit comments

Comments
 (0)