While writing a small plugin I stumbled upon this strangeness. I have TMail objects stored in database for process that sends them out whenever needed. Obvious way of sending them out would be calling ActionMailer::Base.deliver(my_mail_object) That works just fine. However I have method chain hooking into instance method deliver!: 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: ActionMailer::Base.new.deliver_without_something_crazy!(my_mail_object) 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 deliver method: ActionMailer::Base.deliver(mail) new.deliver!(mail) end 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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---