diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-18 13:35:16 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-18 13:35:16 +0000 |
commit | 2632664f6459b387f64ba473712af049e543beb4 (patch) | |
tree | 37f76d2a8268f4e68bac0da0caae73efb53a4643 /railties/environments | |
parent | 27ba5edef1c4264a8d1c0e54675723d37a391dd8 (diff) | |
download | rails-2632664f6459b387f64ba473712af049e543beb4.tar.gz rails-2632664f6459b387f64ba473712af049e543beb4.tar.bz2 rails-2632664f6459b387f64ba473712af049e543beb4.zip |
Deprecation: remove components from controller paths. Canonicalize RAILS_ROOT by using File.expand_path on Windows, which doesn't have to worry about symlinks, and Pathname#realpath elsewhere, which respects symlinks in relative paths but is incompatible with Windows. Closes #6755.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/environments')
-rw-r--r-- | railties/environments/boot.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/railties/environments/boot.rb b/railties/environments/boot.rb index b7af0c35c7..901deb666d 100644 --- a/railties/environments/boot.rb +++ b/railties/environments/boot.rb @@ -1,15 +1,6 @@ # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb -unless defined?(RAILS_ROOT) - root_path = File.join(File.dirname(__FILE__), '..') - - unless RUBY_PLATFORM =~ /(:?mswin|mingw)/ - require 'pathname' - root_path = Pathname.new(root_path).cleanpath(true).to_s - end - - RAILS_ROOT = root_path -end +RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) unless defined?(Rails::Initializer) if File.directory?("#{RAILS_ROOT}/vendor/rails") |