White-labeling - config.plugins-fu fails in Rails 2.1

What I'm trying to do is to enumerate all available plugins and then exclude specific plugins. This allows me to white-label my site and load the necessary brand via plugin specified in the environment at run-time. If there's a better way to accomplish this in Rails 2.1, I'm all ears.

The following approach in config/environment.rb for enumerating all the plugins to be loaded worked in Rails 2.0 but fails in Rails 2.1:

  config.plugins = config.plugin_locators.map do |locator|

locator.new(Rails::Initializer.new(config)).plugins                      end.flatten.map{|p| p.name.to_sym}

Error is:

/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/plugin/ locator.rb:81:in `plugins': wrong argument type Symbol (expected Proc) (TypeError)

Seems to be failing in the GemLocator#plugins method.

Any thoughts on how to modify this code to work in Rails 2.1? Or is there a better way to do what I am trying to accomplish?