Skip to content

Instantly share code, notes, and snippets.

@mupkoo
Created November 5, 2014 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mupkoo/064e99b708d68fb100ae to your computer and use it in GitHub Desktop.
Save mupkoo/064e99b708d68fb100ae to your computer and use it in GitHub Desktop.
Comment decorate User
import Ember from 'ember';
import UserController from 'app/controllers/user';
export default Ember.ObjectController.extend({
decorateUser: function () {
var self = this;
this.get('user').then(function (user) {
var controller = UserController.create({ model: user });
self.set('decoratedUser', controller);
});
}.observes('user').on('init')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment