Skip to content

Instantly share code, notes, and snippets.

Avatar

EricOP ericop

  • Central Michigan University
  • Michigan, USA
View GitHub Profile
@ericop
ericop / controllers.application.js
Last active Oct 7, 2016
Embedded Records with _id
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Embedded Records with _id'
});
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Event Planning'
});
@ericop
ericop / application.adapter.js
Last active Apr 21, 2016
EricOP Small Biz Demo
View application.adapter.js
import DS from 'ember-data'
DS.FixtureAdapter.extend({});
var AppAdapter = DS.FixtureAdapter.reopen({
generateIdForRecord: function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r, v;
r = Math.random() * 16 | 0;
v = c === 'x' ? r : r & 0x3 | 0x8;
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Eric OPs Ember Twiddle'
});