Actionview Template Error when sending actionmailer e-mail - Ruby on Rails
I'm getting an error anytime I try and send out an e-mail to users. The below is sent out every day at noon:
<% @user.account开发者_如何学JAVA.ideas.each do |idea| %> #this is the line that errors
<%= idea.title %>
<% end %>
Here's the error:
scheduler caught exception :
ActionView::Template::Error
/Library/Ruby/Gems/1.8/gems/activesupport- 3.0.7/lib/active_support/whiny_nil.rb:48:in `method_missing'
I think it's something with the email not being able to interact with controllers... any thoughts? I'm lost. Thanks.
Judging by the fact that the warning comes out of whiny_nil.rb
, I'm willing to bet that @user.account
is returning nil
rather than an actual Account
object. Search through your database for users without an account, I reckon there's at least one.
精彩评论