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: <body style="margin:0; padding:0; background: #fffff">
7: <table width="100%" border="0" cellspacing="0" cellpadding="0"
style='padding-left: 10px'>
8: <tr><td>Please view Weekly online by clicking link:</td></
tr>
9: <tr><td> <%= link_to
"#{weekly_mailer_online_url( @mailer.token )}",
weekly_mailer_online_url( @mailer.token ) %> </td></tr>
10: <tr><td>If the above link is not clickable, please copy and
paste it into your browser.</td></tr>
11: <tr><td><br/></td></tr>
12: <tr><td><br/></td></tr>
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:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:74:in `catch'
thin (1.2.7) lib/thin/connection.rb:74:in `pre_process'
thin (1.2.7) lib/thin/connection.rb:57:in `process'
thin (1.2.7) lib/thin/connection.rb:42:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.2.7) lib/thin/backends/base.rb:57:in `start'
thin (1.2.7) lib/thin/server.rb:156:in `start'
thin (1.2.7) lib/thin/controllers/controller.rb:80:in `start'
thin (1.2.7) lib/thin/runner.rb:177:in `send'
thin (1.2.7) lib/thin/runner.rb:177:in `run_command'
thin (1.2.7) lib/thin/runner.rb:143:in `run!'
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
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.