I’m trying to access a model for global system settings. It should be loaded in almost every controller. The problem is I can’t find any help on getting rails to load the dam thing.
If this helps, the model is called Config and has two columns; ‘key’ and ‘value’
I come from a background in PHP. I remember codeigniter could load models via.
$this->load->model('a_model_name');
The controllers I’m trying to load the model in do not have the same name as the model.
The problem here is actually the name of the model. Config is used by other Rails classes – see the list of reserved names on the Rails wiki