diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-10-14 21:54:12 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-10-14 21:54:12 +0000 |
commit | f2c7634db58b52f8d0415a7002976089fea3191c (patch) | |
tree | 0d559fd57621a367041c7f18d6f65bac1a6e2afb /railties | |
parent | 29d4c2b36f92b333b66091869b5cf61e2a480a36 (diff) | |
download | rails-f2c7634db58b52f8d0415a7002976089fea3191c.tar.gz rails-f2c7634db58b52f8d0415a7002976089fea3191c.tar.bz2 rails-f2c7634db58b52f8d0415a7002976089fea3191c.zip |
Added cleaning of RAILS_ROOT to useless elements such as '../non-dot-dot/'. Provides cleaner backtraces and error messages.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/environments/boot.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 6a1fb77408..04f2b2bd87 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added cleaning of RAILS_ROOT to useless elements such as '../non-dot-dot/'. Provides cleaner backtraces and error messages. [Nicholas Seckar] + * Made the instantiated/transactional fixtures settings be controlled through Rails::Initializer. Transactional and non-instantiated fixtures are default from now on. [Florian Weber] * Support using different database adapters for development and test with ActiveRecord::Base.schema_format = :ruby [Sam Stephenson] diff --git a/railties/environments/boot.rb b/railties/environments/boot.rb index 1df433a7eb..bc075ed09b 100644 --- a/railties/environments/boot.rb +++ b/railties/environments/boot.rb @@ -1,4 +1,5 @@ -RAILS_ROOT = File.join(File.dirname(__FILE__), '..') unless defined?(RAILS_ROOT) +require 'pathname' +RAILS_ROOT = Pathname.new(File.join(File.dirname(__FILE__), '..')).cleanpath.to_s + '/' unless defined?(RAILS_ROOT) if File.directory?("#{RAILS_ROOT}/vendor/rails") require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" |