Skip to content

Instantly share code, notes, and snippets.

@Baukereg
Baukereg / mirage.config.js
Last active March 5, 2020 15:18 — forked from samselikoff/mirage.config.js
Mirage dev boilerplate
export default function() {
window.server = this;
this.get('users/:id');
this.post('users', (schema, request) => {
let attrs = this.normalizedRequestAttrs();
return schema.users.create(attrs);
});
};
import Ember from 'ember';
export default Ember.Controller.extend({
db: Ember.computed('refreshDb', function() {
let dump = window.server.schema.db.dump();
return JSON.stringify(dump, null, 2);
}),
@Baukereg
Baukereg / controllers.application.js
Last active May 9, 2017 09:23
CP Validations nested key
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});