Is your association between the two tables defined correctly? The error is
telling me that the Posts model does not know about its connection to the
Readers model.

On Sat, Jul 4, 2009 at 8:26 PM, JoshLucas <[email protected]> wrote:

>
> I am attempting to do this homework and I am having a problem with the
> posts to many readers. When I try to populate the tables, I get this
>
>
> uninitialized constant Post::Reader
>
>
> the third  line where i get the trouble
>
>    reader1 = Readers.create(:id => 1,:reader => "Josh")
>    post1 = Post.create(:id => 1,:title => "I like art and
> sport", :body => "some message")
>    post1.readers << reader1
>
> I did add to the post.rb file that it has many readers and to the
> readers.rb that it belongs to post. Am I missing something else?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to