Closed thombruce closed 4 years ago
We currently use this to allow users to set the URL that will be generated for emails. It's a feature of the UI on Helvellyn.
Take a page from Devise's book:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
That gets set in an initializer. The inheriting app can still either set it later, or they can add a callback as discussed here: https://github.com/thombruce/helvellyn/pull/45#issuecomment-614638235
ActiveSupport.on_load(:active_record) do config.action_mailer.default_url_options = Settings.hostname end
You can also set a default from in an initializer:
config.action_mailer.default_options = {from: 'no-reply@example.com'}
We currently use this to allow users to set the URL that will be generated for emails. It's a feature of the UI on Helvellyn.
Take a page from Devise's book:
That gets set in an initializer. The inheriting app can still either set it later, or they can add a callback as discussed here: https://github.com/thombruce/helvellyn/pull/45#issuecomment-614638235