Skip to content

Commit 864347d

Browse files
authored
Merge pull request #202 from fbernier/patch-1
Clarify :dependent option when you don't want to act on descendant nodes upon parent deletion.
2 parents efb2660 + 25bf8c0 commit 864347d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ When you include ```has_closure_tree``` in your model, you can provide a hash to
284284
* ```:nullify``` will simply set the parent column to null. Each child node will be considered a "root" node. This is the default.
285285
* ```:delete_all``` will delete all descendant nodes (which circumvents the destroy hooks)
286286
* ```:destroy``` will destroy all descendant nodes (which runs the destroy hooks on each child node)
287+
* ```nil``` does nothing with descendant nodes
287288
* ```:name_column``` used by #```find_or_create_by_path```, #```find_by_path```, and ```ancestry_path``` instance methods. This is primarily useful if the model only has one required field (like a "tag").
288289
* ```:order``` used to set up [deterministic ordering](#deterministic-ordering)
289290
* ```:touch``` delegates to the `belongs_to` annotation for the parent, so `touch`ing cascades to all children (the performance of this for deep trees isn't currently optimal).

0 commit comments

Comments
 (0)