diff options
author | Carlhuda <carlhuda@engineyard.com> | 2009-12-23 14:55:12 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2009-12-23 16:13:09 -0800 |
commit | 38aeb1528c376f7a058beea6db0a328720b85f01 (patch) | |
tree | c7bb623d13b49e7861e531ec05ba4f2f2c770a0b /railties/lib/rails/plugin.rb | |
parent | fa8dfc7d014f6768599077b79a874894e13d317f (diff) | |
download | rails-38aeb1528c376f7a058beea6db0a328720b85f01.tar.gz rails-38aeb1528c376f7a058beea6db0a328720b85f01.tar.bz2 rails-38aeb1528c376f7a058beea6db0a328720b85f01.zip |
Moving out some framework specific initializers into the framework libraries.
Diffstat (limited to 'railties/lib/rails/plugin.rb')
-rw-r--r-- | railties/lib/rails/plugin.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 90dc1ad8dd..0699affea7 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -2,8 +2,10 @@ module Rails class Plugin include Initializable - def self.plugin_name - @plugin_name || name.demodulize.underscore + def self.plugin_name(plugin_name = nil) + @plugin_name ||= name.demodulize.underscore + @plugin_name = plugin_name if plugin_name + @plugin_name end def self.inherited(klass) @@ -20,7 +22,7 @@ module Rails end def self.config - @config ||= Configuration.new + Configuration.default end class Vendored < Plugin |