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

Constraints? #7

@mltsy

Description

@mltsy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions