Skip to content

Instantly share code, notes, and snippets.

View bobey's full-sized avatar

Olivier Balais bobey

View GitHub Profile
@bobey
bobey / .gitconfig
Last active December 12, 2015 05:38
Git config global
[core]
excludesfile = ~/.gitignore
editor = vim
[color]
ui = true
[alias]
co = checkout
ci = commit
st = status
App.TableAlias = DS.Model.extend({
name: DS.attr('string'),
alias: DS.attr('string'),
// ...
environment: null,
columns: [],
@bobey
bobey / ember-data-lazy-loading.js
Last active December 10, 2015 20:59
I want to lazy load those post comments without embedding comment ids in my post GET JSON
// My models:
App.Post = DS.Model.extend({
content: DS.attr('string'),
comments: DS.hasMany('App.Comment')
});
App.Comment = DS.Model.extend({
content: DS.attr('string'),
post: DS.belongsTo('App.Post')
});
@bobey
bobey / gist:4346812
Created December 20, 2012 17:09
Route connectOutlet in root and index route
show: Em.Route.extend({
// ...
route: '/show/:schema_id',
connectOutlets: function(router, schema) {
router.get('configurationController').connectOutlet('right', 'schemaShow', schema);
},
index: Em.Route.extend({