Skip to content

Commit

Permalink
moved the default option settings to the model level
Browse files Browse the repository at this point in the history
  • Loading branch information
lacyrhoades committed Sep 13, 2010
1 parent 8cd40ae commit 8a5eeed
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -76,11 +76,6 @@ public function executeUpdate(sfWebRequest $request)

$formName = $this->form->getName();

$values = $request->getParameter($formName);
$default_values = $request->getParameter('default_values');

$values = array_merge($default_values, $values);

$this->form->bind($request->getParameter($formName), $request->getFiles($formName));

// response is a json with an error key
Expand Down Expand Up @@ -256,6 +251,7 @@ protected function _setupVariables(sfWebRequest $request)
if (!$this->object)
{
$this->object = new $this->model();
$this->object->fromArray($this->default_values);
}

if (!class_exists($this->formClass))
Expand Down

0 comments on commit 8a5eeed

Please sign in to comment.