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

Make authentication email addresses customizable #197

Merged
merged 2 commits into from
Aug 2, 2014

Conversation

kjperry
Copy link
Contributor

@kjperry kjperry commented Aug 1, 2014

Completes #182.

@@ -68,6 +68,8 @@ generic_domains:
# app/views/admin/organizations/index.html.haml.
admin_support_email: [email protected]

# The email address that confirmation emails are sent from after user signup.
confirmation_email:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set this to '[email protected]'. These are the settings for our demo site, and we'd like to have a default value here. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can definitely do, fast question though - it used to be hardcoded to [email protected]; did you mean that one instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the new one is better. The old one is not an actual email address and we'd like people to send us email if they want to. Thanks for checking though.

@monfresh
Copy link
Member

monfresh commented Aug 1, 2014

Looks good, thanks! Could you also please add a spec for this? You can just add a new expectation in this spec. Something like this:

expect(first_email.from).to eq('[email protected]')
reset_email

Then define first_email and reset_email in a helper module in spec/support/mailer_macros.rb (you'll have to create that folder):

module MailerMacros
  def first_email
    ActionMailer::Base.deliveries.first
  end

  def reset_email
    ActionMailer::Base.deliveries = []
  end
end

Thanks!

@monfresh
Copy link
Member

monfresh commented Aug 1, 2014

Oh, and you'll need to add config.include MailerMacros here.

Also set default value in config/settings.yml.
@kjperry
Copy link
Contributor Author

kjperry commented Aug 1, 2014

Done and done. Thanks for the pointers.

@monfresh monfresh merged commit fd9075f into codeforamerica:master Aug 2, 2014
@monfresh
Copy link
Member

monfresh commented Aug 2, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants