Project

General

Profile

« Previous | Next » 

Revision 791e1829

Added by Daniel Lobato Garcia over 8 years ago

Refs #12155 - Use Proc instead of lambda on mailer for Rails 4

Problem:
On Rails 3, using a lambda with no arguments works fine in an
ActionMailer default. However on Rails 4, the lambda will whine because
there is no handling of arguments and ActionMailer is trying to pass a
HostMailer.

Solution:
Use Procs instead of lambda to allow it to work with and without arguments.

How to reproduce the error:
Checkout https://github.com/eLobato/foreman/tree/rails4_from_scratch,
change the -> by ->(args) and put a debug breakpoint inside. Verify
ActionMailer is passed. On Rails 3 this is not the case.

  • added
  • modified
  • copied
  • renamed
  • deleted