FIX: Could navigate back to "Preferences" from "Change Email"

This commit is contained in:
Robin Ward 2014-01-23 11:38:41 -05:00
parent ae06ea6323
commit 03779697e7
2 changed files with 6 additions and 5 deletions

View file

@ -11,10 +11,6 @@ Discourse.PreferencesRoute = Discourse.RestrictedUserRoute.extend({
return this.modelFor('user');
},
renderTemplate: function() {
this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' });
},
setupController: function(controller, model) {
controller.set('model', model);
this.controllerFor('user').set('indexStream', false);
@ -51,6 +47,12 @@ Discourse.PreferencesRoute = Discourse.RestrictedUserRoute.extend({
}
});
Discourse.PreferencesIndexRoute = Discourse.RestrictedUserRoute.extend({
renderTemplate: function() {
this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' });
},
});
/**
The route for editing a user's "About Me" bio.

View file

@ -25,7 +25,6 @@ Discourse.UserRoute = Discourse.Route.extend({
},
model: function(params) {
// If we're viewing the currently logged in user, return that object
// instead.
var currentUser = Discourse.User.current();