While writing a small plugin I stumbled upon this strangeness. I have
TMail objects stored in database for process that sends them out
Obvious way of sending them out would be calling
That works just fine. However I have method chain hooking into instance
alias_method_chain :deliver!, :something_crazy
so I need to send directly using deliver_without_something_crazy!
method. Easy, right? All that I need to do is call:
Problem is that ActionMailer::Base.new returns nil for whatever reason.
That doesn’t make much sense to me because this is the definition of
So, if I return/raise ‘new’ inside that function it actually returns
ActionMailer::Base object instead of nil. As far as I can see those
should be identical calls, returning the same result.
Can anybody shine some light on this?