devise icon indicating copy to clipboard operation
devise copied to clipboard

Mirror rails default_sender logic

Open jmschneider opened this issue 3 years ago • 5 comments

Update default_sender logic to mirror the Rails compute_default method.

The existing code uses instance_eval which always passes self in as the first argument. The examples in the Rails guides and API docs use lambdas with no arguments. With the existing Devise code this raises an ArgumentError exception since lambda expects no arguments and one is passed.

jmschneider avatar Jun 10 '21 14:06 jmschneider

Are there any roadblocks for merging this? It would be nice if devise were compatible with the current rails docs.

jmschneider avatar Mar 02 '22 17:03 jmschneider

Are there any roadblocks for merging this? It would be nice if devise were compatible with the current rails docs.

jmschneider avatar Mar 31 '23 14:03 jmschneider

we need this fix, experiencing the same issue. I'll have to create another mailer class as a workaround

dilshod avatar Feb 29 '24 13:02 dilshod

@dilshod you may be able to use a proc instead of a lambda. I think that worked for us.

jmschneider avatar Feb 29 '24 15:02 jmschneider

@jmschneider yes, that works, thanks

dilshod avatar Feb 29 '24 17:02 dilshod