aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/plugin/loader.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 17:08:09 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-22 17:08:09 +0000
commita5af3f75af86ff0abd9964bfd69483d116c12b13 (patch)
tree5e16778559fce11a84117e6fe38e6e2b4bb0a572 /railties/lib/rails/plugin/loader.rb
parente38ad5ddcc1de38ff485d3d78d9c72283320cdaf (diff)
downloadrails-a5af3f75af86ff0abd9964bfd69483d116c12b13.tar.gz
rails-a5af3f75af86ff0abd9964bfd69483d116c12b13.tar.bz2
rails-a5af3f75af86ff0abd9964bfd69483d116c12b13.zip
Added symbols as a legal way of specifying plugins in config.plugins (closes #9629) [tom]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails/plugin/loader.rb')
-rw-r--r--railties/lib/rails/plugin/loader.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/plugin/loader.rb b/railties/lib/rails/plugin/loader.rb
index e935f9b34b..016bcc6c50 100644
--- a/railties/lib/rails/plugin/loader.rb
+++ b/railties/lib/rails/plugin/loader.rb
@@ -13,7 +13,7 @@ module Rails
def initialize(initializer, directory)
@initializer = initializer
@directory = directory
- @name = File.basename(directory)
+ @name = File.basename(directory).to_sym
end
def load
@@ -126,7 +126,7 @@ module Rails
end
if !explicitly_enabled? && !other_plugin_loader.explicitly_enabled?
- name <=> other_plugin_loader.name
+ name.to_s <=> other_plugin_loader.name.to_s
elsif registered_plugins.include?(:all) && (!explicitly_enabled? || !other_plugin_loader.explicitly_enabled?)
effective_index = explicitly_enabled? ? registered_plugins.index(name) : registered_plugins.index(:all)
other_effective_index = other_plugin_loader.explicitly_enabled? ?
@@ -138,7 +138,7 @@ module Rails
end
else
- name <=> other_plugin_loader.name
+ name.to_s <=> other_plugin_loader.name.to_s
end
end
end