public function updateGroup($id, $input)
{
$validator = $this->Validator->make($input, $this->updateRules($id, $input), array("Could not update group"));
if ($validator->passes()) {
$group = $this->Group->findOrFail($id);
$group->name = $input['name'];
$group->save();
return $group;
}
$this->errors = $validator->errors()->all();
$this->message = "There were validation errors.";
return false;
}