Skip to content

Instantly share code, notes, and snippets.

@Keeo
Last active October 4, 2015 17:52
Show Gist options
  • Save Keeo/8c688f5e131b32cdb6c0 to your computer and use it in GitHub Desktop.
Save Keeo/8c688f5e131b32cdb6c0 to your computer and use it in GitHub Desktop.
//app/sessions/application
import Session from 'simple-auth/session';
import Ember from 'ember';
const { computed } = Ember;
const { service } = Ember.inject;
export default Session.extend({
store: service(),
user: computed('secure.userId', function(){
return this.get('store').findRecord('user', this.get('secure.userId'));
})
});
//config/environment.js
'simple-auth': {
session: 'session:application'
}
@Keeo
Copy link
Author

Keeo commented Oct 4, 2015

Its not, it should work with 1.13.x.
I am wondering if problem is with store: service(), or with session itself.
If error persists when you comment out this then there must be wrong something like file name, or configuration. Also check that your session is in app/sessions/application.js

//config/environment.js
module.exports = function (environment) {
  var ENV = {
    'simple-auth': {
      session: 'session:application',
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment