Skip to content

Instantly share code, notes, and snippets.

View 2468ben's full-sized avatar

Ben Donaldson 2468ben

  • Crowdly
  • Amherst, MA
View GitHub Profile
2468ben / config.js
Created September 10, 2015 01:48
Active Model Sideload-only Serializer code
import Em from 'ember';
import utils from 'ember-cli-mirage/shorthands/utils';
import serializerDefs from 'crowdly-pa/tests/helpers/serializer-defs';
import SerializerMachine from 'crowdly-pa/tests/helpers/serializer-machine';
import { pluralize } from 'ember-inflector';
export default function() {
this.timing = 50; // delay for each request, automatically set to 0 during testing
2468ben / query-params-route-mixin.js
Created April 8, 2016 23:12
2468ben's query param setup
/* global getOwner */
import Em from 'ember';
import _ from 'lodash/lodash';
export default Em.Mixin.create({
'query-params': Em.inject.service(),
qpRouteName: null,
enteredRoute: false,
onInit: Em.on('init', function() {
this.set('queryParamDefaults', this.currentQPs());