-
Louis-Michel Couture authored
Rails allow procs and lambda with either zero or more argument. Devise however always tried to call instance_eval on those values, which does always pass one argument: self. There was a PR to fix this specific problem in Devise https://github.com/heartcombo/devise/pull/4627, before the arity check was fixed in rails itself: https://github.com/rails/rails/pull/30391. But even if the problem was fixed in Rails, Devise was still calling the proc/lambas with instance_eval. That meant the fix added to Rails did not apply to Devise. The fix is to let Rails handle the :from and :reply_to defaults. We do that by unsetting the headers instead of trying to replicate Rails handling in Devise. This lets Rails handle it when setting up the mailer.
Louis-Michel Couture authoredRails allow procs and lambda with either zero or more argument. Devise however always tried to call instance_eval on those values, which does always pass one argument: self. There was a PR to fix this specific problem in Devise https://github.com/heartcombo/devise/pull/4627, before the arity check was fixed in rails itself: https://github.com/rails/rails/pull/30391. But even if the problem was fixed in Rails, Devise was still calling the proc/lambas with instance_eval. That meant the fix added to Rails did not apply to Devise. The fix is to let Rails handle the :from and :reply_to defaults. We do that by unsetting the headers instead of trying to replicate Rails handling in Devise. This lets Rails handle it when setting up the mailer.
Loading