ember-cybertooth-base-model
v1.0.0-beta.0
Published
Implementation of a Base model that leverages Rails Active Record timestamp fields. Additional helper functions are provided to query model status/persistence.
Downloads
3
Maintainers
Readme
ember-cybertooth-base-model
Implementation of a Base model that leverages Rails Active Record timestamp fields. Additional helper functions are provided to query model status/persistence.
Features
- Includes date attributes for the Rails-like
createdAt
&updatedAt
timestamp fields.
Motivation
- Hide details of the AWS Amplify
Auth
&CognitoUser
- Fold into familiar
ember-simple-auth
ecosystem - Automatically refresh access tokens on a schedule using
ember-concurrency
Built With
Tested Against
Installation
ember install ember-cybertooth-base-model
Upgrading
When working through the Ember upgrade process, I recommend
invoking the ember install ember-cybertooth-base-model
command once
you are done to get the latest version of the add-on.
If you've already got the package installed and just want to run the
add-on blueprint: ember g ember-cybertooth-base-model
.
Dependencies
ember-data
- Ember-Data; hopefully this obvious.
Usage
Simply extend your model classes with the -base.js
class:
import BaseModel from 'ember-cybertooth-base-model/models/-base';
import DS from 'ember-data';
export default BaseModel.extend({
// your model goodies in here...
});
Contributing
Check out CONTRIBUTING.md.
License
This project is licensed under the MIT License.