You have a nil object when you didn't expect it!

<% if @flash[:error] %>

<%= @flash[:error] %>

<% end %>
<% if @flash[:warning] %>
<%= @flash[:warning] %>

<% end %>
<% if @flash[:notice] %>
<%= @flash[:notice] %>

<% end %>

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.[]

How I must do it?

Hi,

Did you see any line number in the error?
It would be helpful if you gould give the whole trace rather than just
the
error message

NAYAK

On Fri, Jan 9, 2009 at 3:36 PM, Gi Ga
[email protected]wrote:

  • NAYAK

How I must do it?
could it be, it’s “flash[:notice]” without the @.

if not, tell us where your error occurred (which line). then show us
the code calling it (controller/action).

MaD wrote:

could it be, it’s “flash[:notice]” without the @.

Thanks, now it works.