Skip to content

Instantly share code, notes, and snippets.

@slywalker
Created March 9, 2010 04:36
Show Gist options
  • Save slywalker/326193 to your computer and use it in GitHub Desktop.
Save slywalker/326193 to your computer and use it in GitHub Desktop.
diff --git a/workshop/controllers/posts_controller.php b/workshop/controllers/posts_controller.php
index 35c892c..d2324d4 100644
--- a/workshop/controllers/posts_controller.php
+++ b/workshop/controllers/posts_controller.php
@@ -28,7 +28,7 @@ class PostsController extends AppController {
}
}
$tags = $this->Post->Tag->find('list');
- $users = $this->Post->User->find('list');
+ $users = $this->Post->User->find('list', array('fields' => array('id', 'username')));
$this->set(compact('tags', 'users'));
}
@@ -49,7 +49,7 @@ class PostsController extends AppController {
$this->data = $this->Post->read(null, $id);
}
$tags = $this->Post->Tag->find('list');
- $users = $this->Post->User->find('list');
+ $users = $this->Post->User->find('list', array('fields' => array('id', 'username')));
$this->set(compact('tags','users'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment