2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-11 21:04:42 +08:00

Removed modelReady hack now that the async router exists

This commit is contained in:
Robin Ward 2013-07-16 13:24:59 -04:00
parent 6929ee9f46
commit 4bfb546942
8 changed files with 22 additions and 42 deletions

View file

@ -238,9 +238,9 @@ Discourse.AdminUser = Discourse.User.extend({

loadDetails: function() {
var model = this;
if (model.get('loadedDetails')) { return; }
if (model.get('loadedDetails')) { return Ember.RSVP.resolve(model); }

Discourse.AdminUser.find(model.get('username_lower')).then(function (result) {
return Discourse.AdminUser.find(model.get('username_lower')).then(function (result) {
model.setProperties(result);
model.set('loadedDetails', true);
});