Skip to content

Commit

Permalink
[fr] Follow #1045
Browse files Browse the repository at this point in the history
Update part-two.rst on Edit Article
  • Loading branch information
cake17 committed Jan 26, 2014
1 parent 5b67caa commit 73b3cc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion en/tutorials-and-examples/blog/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ Calling the ``save()`` method will check for validation errors and
abort the save if any occur. We'll discuss how those errors are
handled in the following sections.

The reason why we call the ``create()`` method first is to resets the model state for saving new information. It does not actually create a record in the database but clears Model::$id and sets Model::$data based on your database field defaults.
The reason why we call the ``create()`` method first is to resets the model
state for saving new information. It does not actually create a record in the
database but clears Model::$id and sets Model::$data based on your database
field defaults.

Data Validation
===============
Expand Down
6 changes: 6 additions & 0 deletions fr/tutorials-and-examples/blog/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ L'appel de la méthode ``save()`` vérifiera les erreurs de validation et
interrompra l'enregistrement si une erreur survient. Nous verrons
la façon dont les erreurs sont traitées dans les sections suivantes.

La raison pour laquelle nous appelons la méthode ``create()`` en premier est
pour réinitialiser l'état du model pour sauvegarder les nouvelles informations.
Cela ne crée pas réellement un enregistrement dans la base de données mais
réinitialise Model::$id et définit Model::$data en se basant sur le champ par
défaut dans votre base de données.

Valider les données
===================

Expand Down

0 comments on commit 73b3cc4

Please sign in to comment.