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

Models: initialize lifecycle method. #78

Merged
merged 1 commit into from
Jan 11, 2017
Merged

Models: initialize lifecycle method. #78

merged 1 commit into from
Jan 11, 2017

Conversation

fahad19
Copy link
Member

@fahad19 fahad19 commented Jan 11, 2017

Like services and factories, a new initialize() lifecycle method has been added.

// ./models/MyModelName.js
import { createModel } from 'frint';

export default createModel({
  initialize(attributes = {}) {
    // `attributes` contains all constructor options
  }
});

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b839929 on models-initialize into 954d2da on master.

@fahad19 fahad19 added the minor label Jan 11, 2017
@fahad19 fahad19 merged commit ce5bc2a into master Jan 11, 2017
@fahad19 fahad19 deleted the models-initialize branch January 11, 2017 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants