Last active
April 6, 2017 14:06
-
-
Save davidpett/b56e962e2109fa02671f17e238f1006b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Module from './module'; | |
export default Module.extend({ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import Contentful from 'ember-data-contentful/models/contentful'; | |
import attr from 'ember-data/attr'; | |
import { hasMany } from 'ember-data/relationships'; | |
const { | |
computed, | |
get | |
} = Ember; | |
export default Contentful.extend({ | |
title: attr('string') | |
images: hasMany('contentful-asset'), | |
moduleType: computed('contentType', function() { | |
return get(this, 'contentType') ? `${get(this, 'contentType').dasherize()}` : null; | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Contentful from 'ember-data-contentful/models/contentful'; | |
import attr from 'ember-data/attr'; | |
export default Contentful.extend({ | |
title: attr('string') | |
modules: hasMany('module') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment