[eluser]Unknown[/eluser]
EDIT: Fixed - should have been in /application/core
I successfully extended the Form_validation library by creating a MY_Form_validation.php in /application/libraries/ - but I can't get the same thing to work with a model.
Error message:
Quote:PHP Fatal error: Class 'MY_Model' not found in /Users/wt ...../application/models/gifts_model.php on line 2
Where /application/models/gifts_model.php has:
Code:
<?php
class Gifts_model extends MY_Model {
var $table = 'gifts';
function Gifts_model() {
// call the model constructor
parent::__construct();
}
and /application/libraries/MY_Model.php (which I've also tried putting in the /models/ directory) begins:
Code:
<?php
class MY_Model extends CI_Model {
function MY_Model()
{
parent::__construct();
}
I assume I've missed something stupid - any ideas?
Thanks,
William