Commit Graph

10 Commits

Author SHA1 Message Date
Javi Martín
ddb37f89ae Apply Style/Proc rubocop rule
While I tend to use `Proc.new`, using `proc` is shorter and more
consistent since we also use `lambda`.
2019-10-26 13:22:49 +02:00
Javi Martín
66da02f1de Evaluate mailer from address at runtime
We're reading the value from the database, but the
`ApplicationMailer.default` method is evaluated when the application is
started. So if we don't use a Proc, we'll need to restart the server
every time we change the value in the database, or else the old value
will still be used.

Using a Proc makes sure the mailer from address is evaluated at runtime,
so emails are sent using the from address currently defined in the
database.

The same situation took place using the devise mailer. Now we don't need
to check for the settings table being present because the Proc in the
devise initializer won't be evaluated before the settings table is
created and populated.
2019-09-10 15:59:59 +02:00
decabeza
43dd3d2169 Include mailer header logo on custom images list 2019-05-21 11:22:04 +02:00
Javi Martín
4c35df4812 Use double quotes inside string interpolation 2019-03-25 14:58:54 +01:00
Julian Herrero
9f21d9c64e Use double quotes in app/mailers 2019-03-15 09:27:01 +01:00
Fernando Blat
a07fbc5b41 Extract mailer from name and address to a setting 2016-12-23 11:28:53 +01:00
Alberto Garcia Cabeza
42722080fc Changes references to Madrid 2016-07-05 13:47:14 +02:00
rgarcia
19b6740d37 updates email from field 2016-06-15 16:46:54 +02:00
Juanjo Bazán
0325dd6199 refactors settings/flags helper to memoize values 2016-02-04 17:45:43 +01:00
rgarcia
3752054aab sends emails [#23] 2015-08-07 20:52:53 +02:00