I have a class ConstData:
class ConstData
US_CITIES = [\'miami\', \'new york\']
EUROPERN_CITIES = [\'madrid\', \'london\']
end
Its s
The reason autoload_paths didn't work for you and you were forced to do:
Dir["lib/**/*.rb"].each do |path|
require_dependency path
end
is because you forgot to namespace your class.
lib/awesome/stuffs.rb should contain a class/module like this:
class/module Awesome::Stuffs
....
but you had:
class/module Stuffs
....
Rails can only autoload classes and modules whose name matches it's file path and file name.
:)