summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/models.rst
diff options
context:
space:
mode:
authorAlex Bilbie <alex@alexbilbie.com>2012-06-02 12:23:41 +0200
committerAlex Bilbie <alex@alexbilbie.com>2012-06-02 12:23:41 +0200
commit149c07726bb60df65766a1046e695b1897652cc7 (patch)
treef73b4d12ba372ea66735249978d7a1269c3cf172 /user_guide_src/source/general/models.rst
parent697b75e5296c4add2577db9099c235781fd34430 (diff)
Changed load model examples to use lowercase model name. Fixes #1417
Diffstat (limited to 'user_guide_src/source/general/models.rst')
-rw-r--r--user_guide_src/source/general/models.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst
index 72acf77b4..87f63e416 100644
--- a/user_guide_src/source/general/models.rst
+++ b/user_guide_src/source/general/models.rst
@@ -104,7 +104,7 @@ Your models will typically be loaded and called from within your
:doc:`controller <controllers>` functions. To load a model you will use
the following function::
- $this->load->model('Model_name');
+ $this->load->model('model_name');
If your model is located in a sub-folder, include the relative path from
your models folder. For example, if you have a model located at
@@ -115,14 +115,14 @@ application/models/blog/queries.php you'll load it using::
Once loaded, you will access your model functions using an object with
the same name as your class::
- $this->load->model('Model_name');
+ $this->load->model('model_name');
- $this->Model_name->function();
+ $this->model_name->function();
If you would like your model assigned to a different object name you can
specify it via the second parameter of the loading function::
- $this->load->model('Model_name', 'fubar');
+ $this->load->model('model_name', 'fubar');
$this->fubar->function();
@@ -133,7 +133,7 @@ view::
function blog()
{
- $this->load->model('Blog');
+ $this->load->model('blog');
$data['query'] = $this->Blog->get_last_ten_entries();
@@ -165,7 +165,7 @@ database. The following options for connecting are available to you:
defined in your database config file will be used:
::
- $this->load->model('Model_name', '', TRUE);
+ $this->load->model('model_name', '', TRUE);
- You can manually pass database connectivity settings via the third
parameter::