Commit 2682c588 authored by Robert Speicher's avatar Robert Speicher

Customize ActionMailer preview path

parent f96127bc
......@@ -39,6 +39,7 @@ Rails.application.configure do
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')
config.action_mailer.preview_path = 'spec/mailers/previews'
config.eager_load = false
end
class DeviseMailerPreview < ActionMailer::Preview
def confirmation_instructions_for_signup
user = User.new(email: 'signup@example.com')
DeviseMailer.confirmation_instructions(user, 'faketoken', {})
end
def confirmation_instructions_for_new_email
user = User.last
DeviseMailer.confirmation_instructions(user, 'faketoken', {})
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment