DEV: refactor user preferences path method

DEV: refactor user preferences path method

diff --git a/app/assets/javascripts/admin/controllers/admin-user-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-user-index.js.es6
index dce7869..b71b516 100644
--- a/app/assets/javascripts/admin/controllers/admin-user-index.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-user-index.js.es6
@@ -79,10 +79,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
     return [];
   },
 
-  @computed("model.username_lower")
-  preferencesPath(username) {
-    return userPath(`${username}/preferences`);
-  },
+  preferencesPath: fmt("model.username_lower", userPath("%@/preferences")),
 
   @computed("model.can_delete_all_posts", "model.staff", "model.post_count")
   deleteAllPostsExplanation(canDeleteAllPosts, staff, postCount) {

GitHub sha: c88fd495

1 Like