Skip to content

Instantly share code, notes, and snippets.

@cloke
cloke / response
Last active December 14, 2015 02:39 — forked from fredjiles/response
DS.RESTAdapter.map('App.Database', {
primaryKey: 'name'
collections: { embedded: 'load' }
});
DS.RESTAdapter.map('App.Collection', {
primaryKey: 'name'
});
@cloke
cloke / gist:4616769
Last active December 11, 2015 14:49 — forked from earnold/gist:4616732
EmberTodo.ItemController = Ember.ObjectController.extend({
completed: function(key, value) {
if (arguments.length > 1){
var item = this.get("content");
console.log("initial value");
console.log(item.get("completed"));
item.set("completed", value);
console.log("after value");
console.log(item.get("completed"));
console.log("is dirty?");
@cloke
cloke / html.html
Last active December 11, 2015 14:28 — forked from mklew/html.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="scripts/vendor/jquery.min.js"></script>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script>
<title>Skillshare</title>
Assume you are using a bound array named links that is defined like [{link: 'some link', title: 'my nifty link', active: true}, ...]
//in JS file. I will assume you have an app called MyApp that was create with Em.Application.create()
MyApp.linksController = Em.ArrayProxy.create({
content: [ { link: 'I am a link', title: 'I am a title', active: true } ]
});
<!-- Navbar
================================================== -->