http://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153
15 lines
304 B
JavaScript
15 lines
304 B
JavaScript
(function() {
|
|
|
|
window.Discourse.UserRoute = Discourse.Route.extend({
|
|
model: function(params) {
|
|
return Discourse.User.find(params.username);
|
|
},
|
|
serialize: function(params) {
|
|
return {
|
|
username: Em.get(params, 'username').toLowerCase()
|
|
};
|
|
}
|
|
});
|
|
|
|
}).call(this);
|