aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/tasks/documentation.rake7
1 files changed, 1 insertions, 6 deletions
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake
index ff66b71dad..eadf7afc52 100644
--- a/railties/lib/rails/tasks/documentation.rake
+++ b/railties/lib/rails/tasks/documentation.rake
@@ -1,11 +1,6 @@
namespace :doc do
def gem_path(gem_name)
- if defined? Bundler
- @specs ||= Bundler.load.specs
- @specs.find{|s| s.name == gem_name}.full_gem_path
- else
- "#{ENV['RAILS_PATH']}/#{gem_name}"
- end
+ File.dirname($LOAD_PATH.grep(/#{gem_name}[\w\-\.]*\/lib$/).first)
end
desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""