Skip to content

Instantly share code, notes, and snippets.

View mikeu's full-sized avatar

Michael Underwood mikeu

  • Calgary, Alberta, Canada
View GitHub Profile
import Vue from 'vue'
import {DataStore, Record} from 'js-data'
// Define a base class that enables property-level vue reactivity and, optionally does so at the relationship-level.
export class VueReactiveRecord extends Record {
constructor (...args) {
// Among other things, this will apply js-data schema if configured to do so; be sure to do `track: true`.
super(...args);
@mikeu
mikeu / controllers.application.js
Last active May 11, 2017 20:24 — forked from samselikoff/controllers.application.js
Mirage 0.3 - Many to Many, with factories
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);
}),