 
   refreshBuildState: () =>
     VM.loadProjects()
-    sel = VM.selected()
-    if sel.page is 'admin'
-      VM.refreshAdminRecentBuilds()
-    else if sel.page is 'build'
-      if VM.build() and VM.build().usage_queue_visible()
-        VM.build().load_usage_queue_why()
-    else if sel.project_name
-      VM.loadProject(sel.username, sel.project, sel.branch, true)
-    else
-      VM.loadRecentBuilds()
+    VM.selected().refresh_fn() if VM.selected().refresh_fn
 
   # Keep this until backend has a chance to fully deploy
   refreshDashboard: () =>

    VM.selected
      page: "admin"
      admin_builds: true

  @get '^/admin/build-state', (cx) -> VM.loadAdminBuildState cx


        username: cx.params.username
        project: cx.params.project
        project_name: "#{cx.params.username}/#{cx.params.project}"
        refresh_fn: =>
          VM.loadProject(cx.params.username, cx.params.project, null, true)

      if project_name is VM.selected().project_name
        sel = _.extend(VM.selected(), sel)
