On Oct 23, 2005, at 10:24 PM, Bryan Redeagle wrote:
> I''m using rails 1.8 and login generator 1.1. I''m using
rails to
> manage the
> contents of my website. I decided to put an admin page for the content
> management. For the sake of convenience, I used Login Generator.
> Now when I go
> to edit or create new content (for now, just posts), it gives me
> the following
> error (this one is for new posts):
>
> NoMethodError in Goblin#new
>
> Showing /goblin/_form.rhtml where line #1 raised:
>
> WARNING: You have a nil object when you probably didn''t expect
> it! Odds are
> you want an instance of ActiveRecord::Base instead.
>
> Look in the callstack to see where you''re working with an object
> that could be
> nil.
> Investigate your methods and make sure the object is what you expect!
>
> Extracted source (around line #1):
>
> 1: <%= error_messages_for ''post'' %>
> 2:
> 3: <!--[form:post]-->
> 4: <p><label
for="post_title">Title</label><br/>
>
> I wish to know how I can keep the nil object (which seems to be the
> issue) from
> showing up. Thank you.
>
> -Bryan-
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
> <%= error_messages_for ''post'' rescue nil %>
cheers-
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
509-577-7732