How are you listing the model in your config/autoload.php file? To get the same result as this:
You need to use something like this:
However, it should also be noted that this depends on where you are attempting to use the model. Classes in the autoload config are not loaded until the Controller's constructor has been executed, so some hooks will execute before the model is loaded.
PHP Code:
$this->_ci->load->model('rights/Users_to_groups_model', 'users_to_groups');
You need to use something like this:
PHP Code:
$autoload['model'] = ['rights/Users_to_groups_model' => 'users_to_groups'];
However, it should also be noted that this depends on where you are attempting to use the model. Classes in the autoload config are not loaded until the Controller's constructor has been executed, so some hooks will execute before the model is loaded.