FIX: Could navigate back to "Preferences" from "Change Email"
This commit is contained in:
parent
ae06ea6323
commit
03779697e7
|
@ -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.
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue