In environment.rb I can add the line
config.load_paths += %W( #{RAILS_ROOT}/app/models/foos )
where 'foos' is a folder. This loads all files inside the foos folder. However it doesn't load any of its subdirectories.
If I knew the names of all the subdirectories in the 'foos' folder, this problem would have an easy solution:
%W[folder1 folder2 folder2].each { |f| f.config.load_paths += %W( #{RAILS_ROOT}/app/models/foos/#{f} ) }
However, I won't always know the names of all folders inside of 'foos'. Is there someway to do this:
config.load_paths += %W( #{RAILS_ROOT}/app/models/foos/#{**WILDCARD**} )
Thanks