When you write "belongs_to :parent" Rails expects there to be a class called Parent.
If you want this to be related to the MyModel class, you'll need to explicitly state that: belongs_to :parent, :class_name => 'MyModel' -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/i62MUc2cQI4J. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.