Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a chained approach to adding actions & hooks to a resource #161

Open
craigedmunds opened this issue Sep 9, 2015 · 0 comments
Open

Comments

@craigedmunds
Copy link

Our syntax currently requires us to pass in a "blob" of options to the call it .resource including arrays of hooks, actions & validators:

.resource({ -- fields -- }, { hooks : [], actions : [], validators : [], etc })

It would be neat to support something more like:

.resource({ -- fields -- })
.addHook(hook)
.addHook(hook)
.addActions(action)
.addValidator(validator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant