Skip to content

Instantly share code, notes, and snippets.

View gilest's full-sized avatar
🆒

Giles Thompson gilest

🆒
View GitHub Profile
@lukes
lukes / initializers-current-user.js
Last active August 29, 2015 14:07
Using Ember.ObjectProxy for currentUser
// (Rename to current-user.js and place in /initializers)
// Ember now complains that you can't type inject a controller into a controller
// so use an Ember.ObjectProxy for currentUser instead.
//
// Ember.ObjectProxy allows you to set a content value, and will delegate
// all getters and setters to its content.
import DS from "ember-data";
import CurrentUser from "../models/current-user";
@paulirish
paulirish / gist:5558557
Last active April 18, 2024 14:32
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa