/** Delete a ruler
  * @access public
  * @return void
  */
 public function deleterulerAction()
 {
     if ($this->_request->isPost()) {
         $id = (int) $this->_request->getPost('id');
         $del = $this->_request->getPost('del');
         if ($del == 'Yes' && $id > 0) {
             $rulers = new Rulers();
             $where = 'id = ' . $id;
             $rulers->delete($where);
         }
         $this->getFlash()->addMessage('Record deleted!');
         $this->redirect($this->_redirectUrl . 'rulers/period/' . $rulers['period']);
     } else {
         $id = (int) $this->_request->getParam('id');
         if ($id > 0) {
             $rulers = new Rulers();
             $this->view->ruler = $rulers->fetchRow('id=' . $id);
         }
     }
 }