Closed nicohvi closed 10 years ago
I have defined app/models/application_config.rb in the following way:
app/models/application_config.rb
class ApplicationConfig < Settingslogic source "#{Rails.root}/config/config.yml" namespace Rails.env end
And config/config.yml:
config/config.yml
development: test: test
However, this happens when I use the Rails console
Rails.Env => 'development' Application_config.test => LoadError: Unable to autoload constant Application_config
And if I try to call Application_config.test again, I get the following error
Application_config.test
RuntimeError: Circular dependency detected while autoloading constant Application_config
Brainfart on my part - Application_config should of course be ApplicationConfig
Application_config should of course be ApplicationConfig
I have defined
app/models/application_config.rb
in the following way:And
config/config.yml
:However, this happens when I use the Rails console
And if I try to call
Application_config.test
again, I get the following error