Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@rstudner
rstudner / controllers.application.js
Created January 3, 2017 13:29 — forked from machty/controllers.application.js
ember-concurrency starter
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
myTask: task(function * () {
let didConfirm = yield this.get('getConfirmation').perform("Are you sure?");
if (didConfirm) {
alert("woot");
import DS from "ember-data";
export default DS.JSONAPIAdapter.extend();
@rstudner
rstudner / helpers.average.js
Last active October 31, 2016 15:12 — forked from toranb/helpers.average.js
EmberReduxYelpClone
import Ember from 'ember';
export default Ember.Helper.helper(function(params) {
var reviews = params[0] || [];
var total = reviews.map((review) => {
return review.rating;
}).reduce((prev, next) => {
return prev + next;
});
var fullStars = Math.floor(total / reviews.length);