Watch your partial names
Submitted by greg on Tue, 06/17/2008 - 18:50
Tagged:
I had a partial named _flash.html.erb, but using my own local variables (i.e., I wasn't using the auto-passed flash variable). So when I tried to utilize Rails' flash var, of course it bombed:
You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[]=
Oops. So watch out for those magic variable names ....














Comments
Post new comment