4 @created_by <%= @author %>
5 @created_at <%= Time.now %>
9 class <%= @controller_name %>_controller extends application_controller {
10 <% for action in @actions %>
11 public function <%= action %>() {
12 // controller logic for <%= action %> action here
17 #### Example Code ####
19 // respond (send to View)
20 $this->response->name = $value;
22 // redirect to another action
23 $this->redirect_to(array('controller'=>'x', 'action'=>'y', 'id'=>'1'))
25 // find all 'shoes' with property x being 12
27 $shoe->find(array('where'=>array('x=":x"', 'x'=>'12')))->all();
31 $shoe->find_by_x('12')->all();
33 // find a shoe with id 14 and respond
35 $this->response->shoe = $shoe->find_by_id('14');