Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Constraints? #7

Open
mltsy opened this issue Mar 1, 2012 · 0 comments
Open

Constraints? #7

mltsy opened this issue Mar 1, 2012 · 0 comments

Comments

@mltsy
Copy link

mltsy commented Mar 1, 2012

It would be awesome if dm-is-tree was compatible with dm-constraints!
I was able to add a constraint to protect nodes with children by repeating the children relationship like this:

is :tree
has n, :children, :model => self, :child_key => :parent_id, :constraint => :protect

However, it would be much more convenient if one could simply say:

is :tree, :constraint => :protect
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant