diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-26 18:00:25 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-26 18:00:25 -0800 |
commit | 9d2002a12a473f5b35c52db82518f4631776414f (patch) | |
tree | 57ab39c446998597a871b67c5d3f28d083832241 /railties/lib/rails/plugin | |
parent | 2c43a6429e537bf4d52c4592fb0c8542029f8e78 (diff) | |
parent | 3cc9d1c5ad1639283b43ee2b6099cb4f3b19bf23 (diff) | |
download | rails-9d2002a12a473f5b35c52db82518f4631776414f.tar.gz rails-9d2002a12a473f5b35c52db82518f4631776414f.tar.bz2 rails-9d2002a12a473f5b35c52db82518f4631776414f.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'railties/lib/rails/plugin')
-rw-r--r-- | railties/lib/rails/plugin/loader.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/railties/lib/rails/plugin/loader.rb b/railties/lib/rails/plugin/loader.rb index 8d7eac53c5..f08d9b74e2 100644 --- a/railties/lib/rails/plugin/loader.rb +++ b/railties/lib/rails/plugin/loader.rb @@ -22,6 +22,11 @@ module Rails @plugins ||= all_plugins.select { |plugin| should_load?(plugin) }.sort { |p1, p2| order_plugins(p1, p2) } end + # Returns the plugins that are in engine-form (have an app/ directory) + def engines + @engines ||= plugins.select(&:engine?) + end + # Returns all the plugins that could be found by the current locators. def all_plugins @all_plugins ||= locate_plugins @@ -56,7 +61,18 @@ module Rails end $LOAD_PATH.uniq! - end + end + + # Returns an array of all the controller paths found inside engine-type plugins. + def controller_paths + engines.collect(&:controller_path) + end + + # Returns an array of routing.rb files from all the plugins that include config/routes.rb + def routing_files + plugins.select(&:routed?).collect(&:routing_file) + end + protected |