Url_for in a ActionMailer::Base decendent


I am not getting to use url helpers in a ActionMailer::Base decendent
I have this:

class Notifier < ActionMailer::Base
require ‘action_view/helpers/url_helper.rb’

When I try to call url_for or link_to I get a stack overflow

stack level too deep

Looking at the stack tace I realized that url_for and send are
called several times in url_helper.

Anyone knows what could this be?


Ricardo A.
[email protected]
Acras Desenvolvimento de Sistemas

Could it be you have overridden the parent constructor? If so call it
explicitly that should work. I’m no ruby expert. This is just
something that sounds common to me as an OO programmer. Anybody else
have a better solution perhaps?