Forum: Ruby on Rails url_for in a ActionMailer::Base decendent

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ricardo A. (Guest)
on 2007-04-15 19:04
(Received via mailing list)
Hi,

  I am not getting to use url helpers in a ActionMailer::Base decendent
class.
  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
exception:

  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?

  Thanks

--
Ricardo A.
removed_email_address@domain.invalid
Acras Desenvolvimento de Sistemas
+55+41-3232-6404
www.acras.net
unimatrixZxero (Guest)
on 2007-04-16 18:07
(Received via mailing list)
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?
This topic is locked and can not be replied to.