diff options
author | Teng Siong Ong <siong1987@gmail.com> | 2013-04-30 06:49:03 -0700 |
---|---|---|
committer | Teng Siong Ong <siong1987@gmail.com> | 2013-04-30 06:49:03 -0700 |
commit | 5aec73daf5ea144ac9f2a4e15c6807cc2dcb87b6 (patch) | |
tree | 6ce2900efb5141b104910a03f107dd114d31135f /railties | |
parent | a834b57b6e6028eebf6ec29c550f5328a527f487 (diff) | |
download | rails-5aec73daf5ea144ac9f2a4e15c6807cc2dcb87b6.tar.gz rails-5aec73daf5ea144ac9f2a4e15c6807cc2dcb87b6.tar.bz2 rails-5aec73daf5ea144ac9f2a4e15c6807cc2dcb87b6.zip |
Make `rake doc:guides` works again. Fix #10384.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/tasks/documentation.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index 1c3426028d..f89d6b12e1 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -57,8 +57,8 @@ namespace :doc do # desc "Generate Rails Guides" task :guides do - # FIXME: Reaching outside lib directory is a bad idea - require File.expand_path('../../../../../guides/rails_guides', __FILE__) + rails_gem_dir = Gem::Specification.find_by_name("rails").gem_dir + require File.expand_path(File.join(rails_gem_dir, "/guides/rails_guides")) RailsGuides::Generator.new(Rails.root.join("doc/guides")).generate end end |