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

Export Changeset class to allow overriding #418

Merged
merged 11 commits into from
Jan 22, 2020
Merged

Export Changeset class to allow overriding #418

merged 11 commits into from
Jan 22, 2020

Conversation

snewcomer
Copy link
Collaborator

@snewcomer snewcomer commented Jan 20, 2020

This PR would allow users to import the Changeset and extend from it.

import { EmberChangeset } from 'ember-changeset

And use like so

changeset(model, validationFn, validationMap, { changeset: ModifiedChangesetKlass })

Also the recommended way to generate new changesets is through a factory function instead of a class and the README has been updated. I'm not sure why the original implementation had a class w/ constructor but the factory function seems better. No breaking changes though.

import { Changeset } from 'ember-changeset

close #174 #390

@snewcomer snewcomer self-assigned this Jan 20, 2020
@snewcomer
Copy link
Collaborator Author

@josemarluedke fyi

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

Successfully merging this pull request may close these issues.

Support Warnings
1 participant