ActionView::TemplateError (undefined method `url_for'


Wow, this is driving me crazy. I keep getting this error:

ActionView::TemplateError (undefined method `url_for’ for
#Notifier:0x40755260) on line #0 of

Absolutely nowhere in that template (or the ActionMailer) is ‘url_for’,
nor any other methods. The
template just outputs variables. Notifier (an ActionMailer) just assigns
the vars. In my
controller I have:

def create

Notifier::deliver_link_added(@site, @link,
url_for({:controller=>‘link’, :action=>‘edit’,

redirect_to({:controller => ‘link’, :action => ‘added’, :id =>})


Furthering my insanity, I get one of three different results:

  1. Application error with the aforementioned error in the log.
  2. Link gets created, but Notifier’s link_added template gets displayed
    for link#added rather than
  3. Everything works fine!

Restarting SCGI usually lets #3 or #2 happen again, but adding
additional links thereafter usually
results in #1.


Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.