# Url\_for in a ActionMailer::Base decendent

**URL:** <https://www.ruby-forum.com/t/url-for-in-a-actionmailer-base-decendent/92064>\
**Category:** Rails\
**Created:** [April 15, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/url-for-in-a-actionmailer-base-decendent/92064 "2007-04-15T17:04:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![acras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@acras](https://www.ruby-forum.com/u/acras)\
**Post date:** [April 15, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/url-for-in-a-actionmailer-base-decendent/92064/1 "2007-04-15T17:04:04Z")

</div>

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](http://www.acras.net)

---

<div class="post-metadata">

**Author:** ![acras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@acras](https://www.ruby-forum.com/u/acras)\
**Post date:** [April 16, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/url-for-in-a-actionmailer-base-decendent/92064/2 "2007-04-16T16:07:52Z")

</div>

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?
