mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
FIX: Could navigate back to "Preferences" from "Change Email"
This commit is contained in:
parent
ae06ea6323
commit
03779697e7
2 changed files with 6 additions and 5 deletions
|
@ -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 a new issue