Displaying 1 result from an estimated 1 matches for "supasite".
Did you mean:
sunsite
2005 Aug 25
3
Active Record Object Dependency
I have three model objects:
1. Document
2. Section
3. Content
According to my requirements a Document must have at least one Section.
Similarly a Section must have at least one Content.
How can I add a Section when a Document is created and add a Content when a
Section is created?
My code:
class Document < ActiveRecord::Base
has_many :sections
end
class Section < ActiveRecord::Base