Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2016 20:09
Show Gist options
  • Select an option

  • Save anonymous/000afbaf47fe4bc3092c to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/000afbaf47fe4bc3092c to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Mar 9, 2016.
    16 changes: 16 additions & 0 deletions community.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    import Ember from 'ember';

    const { computed, inject, ObjectProxy, PromiseProxyMixin } = Ember;

    export default ObjectProxy.extend(PromiseProxyMixin, {
    isServiceFactory: true,
    store: inject.service(),

    promise: computed({
    get() {
    var store = this.get('store');

    return store.findRecord('community', window.community.id);
    }
    })
    });