Ruby on Rails
Wednesday, March 28, 2012
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment