500 errors - (ActionView::TemplateError) "undefined method `token' for nil:NilClass"

My users are getting 500 errors from token link whether they click or
paste into browser. Any help appreciated as I am stumped.

Token linked with with Mail Chimp API.

Thanks.

A ActionView::TemplateError occurred in mailer#weekly:

undefined method `token’ for nil:NilClass
On line #9 of app/views/mailer/weekly.html.erb

6:
7:


8: </
tr>
9:
10:
11:
12:

app/views/mailer/weekly.html.erb:9
pdfkit (0.4.6) lib/pdfkit/middleware.rb:14:in call' thin (1.2.7) lib/thin/connection.rb:76:inpre_process’
thin (1.2.7) lib/thin/connection.rb:74:in catch' thin (1.2.7) lib/thin/connection.rb:74:inpre_process’
thin (1.2.7) lib/thin/connection.rb:57:in process' thin (1.2.7) lib/thin/connection.rb:42:inreceive_data’
eventmachine (0.12.10) lib/eventmachine.rb:256:in run_machine' eventmachine (0.12.10) lib/eventmachine.rb:256:inrun’
thin (1.2.7) lib/thin/backends/base.rb:57:in start' thin (1.2.7) lib/thin/server.rb:156:instart’
thin (1.2.7) lib/thin/controllers/controller.rb:80:in start' thin (1.2.7) lib/thin/runner.rb:177:insend’
thin (1.2.7) lib/thin/runner.rb:177:in run_command' thin (1.2.7) lib/thin/runner.rb:143:inrun!’
thin (1.2.7) bin/thin:6
/usr/local/rvm/gems/ruby-1.8.7-p330/bin/thin:19:in `load’
/usr/local/rvm/gems/ruby-1.8.7-p330/bin/thin:19

Please view Weekly online by clicking link:
<%= link_to
“#{weekly_mailer_online_url( @mailer.token )}”,
weekly_mailer_online_url( @mailer.token ) %>
If the above link is not clickable, please copy and
paste it into your browser.


On 15 February 2011 21:53, TJ [email protected] wrote:

undefined method `token’ for nil:NilClass
On line #9 of app/views/mailer/weekly.html.erb

6:
7:


8: </
tr>
9:

The error suggests that @mailer is nil

Colin

Please view Weekly online by clicking link:
<%= link_to
“#{weekly_mailer_online_url( @mailer.token )}”,
weekly_mailer_online_url( @mailer.token ) %>