adding some comments to the form class.

This commit is contained in:
Taylor Otwell 2011-07-03 12:58:41 -05:00
parent 1375ff98f2
commit c3ea6e656d
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,11 @@ public static function open($action = null, $method = 'POST', $attributes = arra
} }
$attributes['action'] = HTML::entities(URL::to($action)); $attributes['action'] = HTML::entities(URL::to($action));
// -------------------------------------------------------
// If the request method is PUT or DELETE, we'll default
// the request method to POST.
// -------------------------------------------------------
$attributes['method'] = ($method == 'GET' or $method == 'POST') ? $method : 'POST'; $attributes['method'] = ($method == 'GET' or $method == 'POST') ? $method : 'POST';
// ------------------------------------------------------- // -------------------------------------------------------