<?php

class Seguro_ObservacoesController extends Agro_Controller_Action {
	
	public function getModel() {
		return new Seguro_Model_PropostasObservacoes();
	}
	
	public function jsonAction() {
		$Model = $this->getModel();
		$this->isAjax();
		
		if ($this->getRequest()->getParam('id')) {
			$Row = $Model->find($this->getRequest()->getParam('id'))->current();
			
			if ($Row) {
				$this->getResponse()->setBody(Zend_Json::encode($Row->toArray()));
			}
		}
	}
	
}