Route serialize hook argument is the model, not params.

This commit is contained in:
Vikhyat Korrapati 2014-03-19 12:02:27 +05:30
parent 5e93d60e9b
commit 28731ea633
2 changed files with 5 additions and 5 deletions

View File

@ -8,8 +8,8 @@
**/
Discourse.AdminUserRoute = Discourse.Route.extend({
serialize: function(params) {
return { username: Em.get(params, 'username').toLowerCase() };
serialize: function(model) {
return { username: model.get('username').toLowerCase() };
},
model: function(params) {

View File

@ -39,9 +39,9 @@ Discourse.UserRoute = Discourse.Route.extend({
return this.modelFor('user').findDetails();
},
serialize: function(params) {
if (!params) return {};
return { username: Em.get(params, 'username').toLowerCase() };
serialize: function(model) {
if (!model) return {};
return { username: model.get('username').toLowerCase() };
},
setupController: function(controller, user) {