Skip to content

Instantly share code, notes, and snippets.

@twof
Created December 22, 2018 23:51
Show Gist options
  • Select an option

  • Save twof/a0ce639244e699283678805605fe83af to your computer and use it in GitHub Desktop.

Select an option

Save twof/a0ce639244e699283678805605fe83af to your computer and use it in GitHub Desktop.
func crud<ParentType>(
at path: PathComponentsRepresentable...,
parent relation: KeyPath<ChildType, Parent<ChildType, ParentType>>,
_ either: OnlyExceptEither<ParentRouterMethod>,
relationConfiguration: ((CrudParentController<ChildType, ParentType>) -> Void)?
) where
ParentType: Model & Content,
ChildType.Database == ParentType.Database,
ParentType.ID: Parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment