Displaying 2 results from an estimated 2 matches for "build_child".
2006 Jul 12
0
Parent Child - Transaction Issue
...default when you call parent.save it''s not invoked in a
transaction mode, and I''m trying to avoid parent record is created without
the child record (due to validation error in child).
I wanted to save both parent and child in transaction mode:
parent = Parent.new
child = parent.build_child
Parent.transaction do
parent.save! # parent created, child validation check failed but
no exception thrown
child.save! # exception triggered for validation error, transaction
rolled back
end
The problem is because parent was initially successfully created,
paret.new_record? returns true, even...
2006 Dec 30
0
[809] trunk/wxsugar/lib/wx_sugar/layout.rb: Fix default sizers to arrange_vertically, add padding on specified sides
...t[:padding]
</span><span class="cx"> @current_sizer = a_sizer
</span><span class="cx"> yield(self) if block_given?
</span><span class="lines">@@ -123,7 +128,7 @@
</span><span class="cx"> child = build_child(child)
</span><span class="cx"> layout = hints_to_constants(layout_hints)
</span><span class="cx"> proportion = layout_hints[:proportion] || 0
</span><del>- siz = self.current_sizer()
</del><ins>+ siz = self.current_s...