I think because the record with that id is not existed in the database. You
could check the database to to see whether there

is a record with the id. Or you could also check the id value in the
controller, is it valiable?

On Sun, Apr 4, 2010 at 10:05 AM, David Zhu <[email protected]>wrote:

> I'm getting this error-
>
>  ActiveRecord::RecordNotFound in PagesController#create
>
> Couldn't find Course without an ID
>
>
> ------
>
> Btw, the pages belongs to courses, and the courses has many pages
>
> Now, in my pages controller, for my create action, i have this--
>
> def create
>
>    @course = Course.find(params[:id])
>    @page = @course.pages.build(params[:page])
>
> .... if and else stuff....
>
> end
>
>
>
> Whats wrong? Why am i getting this message? Thanks, i really need help!
>
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

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

Reply via email to