[eluser]BrianDHall[/eluser]
Code:
class Races
{
function Races()
{
$this->ci =& get_instance();
}
function get_saved_races($user_id) {
if (! isset($this->ci->race))
{
$this->ci->load->model('race_model', 'race');
}
return $this->ci->race->get_saved_races($user_id);
}
}
That ought to do it I believe.
The new if() just prevents multiple calls to load if it's already loaded, and since you are using $this->ci->load then the model being loaded should be located in the CI super object.
EDIT: Actually, this isn't right - it is an infinate loop. The get_saved_races function calls itself, which calls itself...
You need to fix the return value so it isn't infinately recursive, but this should answer the problems you had.