Displaying 1 result from an estimated 1 matches for "2979fcb".
2009 May 22
1
[PATCH server] fix for BZ #477796: pool name uniqueness
...but the way the betternestedset API sets the parent_id the rules were being bypassed.
Signed-off-by: Scott Seago <sseago at redhat.com>
---
src/app/models/pool.rb | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/app/models/pool.rb b/src/app/models/pool.rb
index 2979fcb..0a63723 100644
--- a/src/app/models/pool.rb
+++ b/src/app/models/pool.rb
@@ -65,6 +65,9 @@ class Pool < ActiveRecord::Base
transaction do
save!
move_to_child_of(parent)
+ # second save! call is to trigger validation rules related to parent_id
+ # since this nested s...