Permalink
Browse files

added view action

  • Loading branch information...
1 parent f0ff3d9 commit 4fa282c76665687cc8a61a69f320d64b00b7b2e5 @mariuz committed Aug 22, 2008
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/controllers/posts_controller.php
@@ -4,7 +4,12 @@ class PostsController extends AppController {
var $name = 'Posts';
function index() {
- $this->set('posts', $this->Post->find('all'));
+ $this->set('posts', $this->Post->find('all'));
+ }
+
+ function view($id = null) {
+ $this->Post->id = $id;
+ $this->set('post', $this->Post->read());
}
}
?>

0 comments on commit 4fa282c

Please sign in to comment.