aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-11-30 15:59:30 -0600
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-11-30 15:59:30 -0600
commitbe140e8c6be966349c6fa35a87f84d5a73995b9a (patch)
tree9c64dcd3e01e7c3e093eaa971217aad7c8e5ae2a /railties/lib
parent668872efd85291895d3e68f3a5af312973a1be74 (diff)
downloadrails-be140e8c6be966349c6fa35a87f84d5a73995b9a.tar.gz
rails-be140e8c6be966349c6fa35a87f84d5a73995b9a.tar.bz2
rails-be140e8c6be966349c6fa35a87f84d5a73995b9a.zip
Changed Rails.root to return a Pathname object (allows for Rails.root.join("app", "controllers") => "#{RAILS_ROOT}/app/controllers") [#1482]
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/initializer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index ef0c335478..a134c68a50 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -48,8 +48,8 @@ module Rails
end
end
- def root(*args)
- File.join(RAILS_ROOT, *args.compact) if defined?(RAILS_ROOT)
+ def root
+ Pathname.new(RAILS_ROOT) if defined?(RAILS_ROOT)
end
def env