Displaying 1 result from an estimated 1 matches for "documentsect".
Did you mean:
documentset
2010 Mar 10
0
Rails ActiveRecord associations autosave option
I have the following associations.
class Document < ActiveRecord::Base
has_many :document_sections, :dependent => :destroy, :autosave => true
has_many :document_items, :through => :document_sections
end
class DocumentSection < ActiveRecord::Base
belongs_to :document
has_many :document_items, :dependent => :destroy, :autosave => true
end
class DocumentItem < ActiveRecord::Base
belongs_to :document_section
end
When I use irb console to do
d = Document.find_by_id(100)
d.title = ''1-commen...