Permalink
Browse files

Updating template selection with render call.

  • Loading branch information...
1 parent 9e0b4fa commit 194ecfae42c7dd892d70111b9b543ca95ac27f10 @davidpersson davidpersson committed Feb 4, 2011
Showing with 7 additions and 4 deletions.
  1. +7 −4 controllers/PastesController.php
@@ -98,10 +98,13 @@ public function add($author = null, $language = 'php') {
));
}
}
- $languages = Paste::languages();
- $url = 'Pastes::add';
- $this->set(compact('url', 'paste', 'languages'));
- $this->render('form');
+ $this->render(array(
+ 'template' => 'form',
+ 'data' => array(
+ 'url' => 'Pastes::add',
+ 'languages' => Paste::languages()
+ ) + compact('paste')
+ ));
}
/**

0 comments on commit 194ecfa

Please sign in to comment.