@@ -87,13 +87,14 @@ The code above adds a lot of functionality.
8787First we load the :doc: `Form helper <../helpers/form_helper >` with the :php:func: `helper() ` function.
8888Most helper functions require the helper to be loaded before use.
8989
90- Next, we check if we deal with the **POST ** request with the Request object ``$this->request ``.
90+ Next, we check if we deal with the **POST ** request with the
91+ :doc: `IncomingRequest <../incoming/incomingrequest >` object ``$this->request ``.
9192It is set in the controller by the framework.
9293If the HTTP method is not POST, that is it is GET,
9394the form is loaded and returned to display.
9495
9596Then, we get the necessary items from the POST data by the user and set them in the ``$post `` variable.
96- We also use the Request object ``$this->request ``.
97+ We also use the :doc: ` IncomingRequest < ../incoming/incomingrequest >` object ``$this->request ``.
9798
9899After that, the Controller-provided helper function :ref: `validateData() <controller-validatedata >`
99100is used to validate ``$post `` data.
@@ -104,7 +105,9 @@ above. You can read more about the :doc:`Validation library <../libraries/valida
104105If the validation fails, the form is loaded and returned to display.
105106
106107If the validation passed all the rules, the **NewsModel ** is loaded and called. This
107- takes care of passing the news item into the model.
108+ takes care of passing the news item into the model. The :ref: `model-save ` method handles
109+ inserting or updating the record automatically, based on whether it finds an array key
110+ matching the primary key.
108111
109112This contains a new function :php:func: `url_title() `. This function -
110113provided by the :doc: `URL helper <../helpers/url_helper >` - strips down
0 commit comments