Skip to content

Commit

Permalink
Fix typos and grammar in the blog tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ataylor32 committed Oct 27, 2012
1 parent 8cb1ec1 commit e3e5357
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions en/tutorials-and-examples/blog/blog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ structure works: check out
Creating the Blog Database
==========================

Next, lets set up the underlying database for our blog. if you
Next, let's set up the underlying database for our blog. if you
haven't already done so, create an empty database for use in this
tutorial, with a name of your choice. Right now, we'll just create
a single table to store our posts. We'll also throw in a few posts
Expand Down Expand Up @@ -186,7 +186,7 @@ informed by a warning while not in production mode.
A Note on mod\_rewrite
======================

Occasionally a new user will run in to mod\_rewrite issues, so I'll
Occasionally a new user will run into mod\_rewrite issues, so I'll
mention them marginally here. If the CakePHP welcome page looks a
little funny (no images or css styles), it probably means
mod\_rewrite isn't functioning on your system. Here are some tips
Expand Down
15 changes: 8 additions & 7 deletions en/tutorials-and-examples/blog/part-two.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ in the PostsController, and will be tied to a database table called

.. note::

CakePHP will dynamically create a model object for you, if it
cannot find a corresponding file in /app/Model. This also means,
CakePHP will dynamically create a model object for you if it
cannot find a corresponding file in /app/Model. This also means
that if you accidentally name your file wrong (i.e. post.php or
posts.php) CakePHP will not recognize any of your settings and will
posts.php), CakePHP will not recognize any of your settings and will
use the defaults instead.

For more on models, such as table prefixes, callbacks, and
Expand Down Expand Up @@ -86,7 +86,7 @@ the ``find('all')`` method of the Post model. Our Post model is
automatically available at ``$this->Post`` because we've followed
Cake's naming conventions.

To learn more about Cake's controllers, check out
To learn more about Cake's controllers, check out the
:doc:`/controllers` chapter.

Creating Post Views
Expand Down Expand Up @@ -287,7 +287,7 @@ PostsController::
any controller where you will use it. If necessary, include it in
your AppController.

Here's what the ``add()`` action does: if HTTP method of the
Here's what the ``add()`` action does: if the HTTP method of the
request was POST, try to save the data using the Post model. If for some
reason it doesn't save, just render the view. This gives us a
chance to show the user validation errors or other warnings.
Expand All @@ -310,8 +310,9 @@ message and clears the corresponding session variable. The
controller's :php:meth:`Controller::redirect` function
redirects to another URL. The param ``array('action' => 'index')``
translates to URL /posts i.e the index action of posts controller.
You can refer to :php:func:`Router::url()` function on the api to see
the formats in which you can specify a URL for various cake functions.
You can refer to :php:func:`Router::url()` function on the
`API <http://api20.cakephp.org>`_ to see the formats in which you can specify a
URL for various Cake functions.

Calling the ``save()`` method will check for validation errors and
abort the save if any occur. We'll discuss how those errors are
Expand Down

0 comments on commit e3e5357

Please sign in to comment.