views:

53

answers:

1

The methods in the last two rows in the block are removed in Rails 3.

%w{ models controllers }.each do |dir|
  path = File.join(File.dirname(__FILE__), 'app', dir)
  $LOAD_PATH << path
  ActiveSupport::Dependencies.load path
  ActiveSupport::Dependencies.load_once_paths.delete(path)
end

I wonder how you could autoload the files in the plugins models and controllers folder?

+1  A: 

load_paths and load_once_paths were renamed in Rails 3 :

ActiveSupport::Dependencies.autoload_paths
ActiveSupport::Dependencies.autoload_once_paths
kares