server.get('api/employee's, function(schema, request) {
employee = schema.employee.find(1);
this.serializerOrRegistry.serialize(employee, request);
return foo;
});
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
// converts '7-foo me, 30-boo me, 30-baz me' to '7,30,30' | |
function serialize(text) { | |
return text.replace(/[^\d,]/g, ''); | |
} | |
// converts '7,30,30' to '7-foo me, 30-boo me, 30-baz me' | |
function humanize(text) { | |
const words = [ | |
'-foo', | |
'-boo', |
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 PSOptionsComponent from 'ember-power-select/components/power-select/options'; | |
const { | |
$, | |
assert, | |
get, | |
} = Ember; |
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'; | |
export default Ember.Controller.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 { moduleFor, test } from 'ember-qunit'; | |
let mockSession = Ember.Service.extend({ | |
isAuthenticated: true, | |
currentUser: Ember.computed('isAuthenticated', function() { | |
return Ember.RSVP.Promise(function(resolve) { | |
resolve( Ember.Object.create({ accounts: [] }) ); | |
}); | |
}) |
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
const generateString = (limit) => { | |
return new Date().getTime().toString().repeat(limit).substring(0, limit); | |
}; | |
generateString(10); // 1526477455 |
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'; | |
export default Ember.Component.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'; | |
export default Ember.Component.extend({ | |
tagName: '' | |
}); |
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 { A } from '@ember/array'; | |
export default Ember.Component.extend({ | |
init() { | |
this._super(...arguments); | |
//this.get('registerItem')(this); | |
} |
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 { computed } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |