Permalink
Browse files

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
  • Loading branch information...
1 parent 29d4c2b commit f2c7634db58b52f8d0415a7002976089fea3191c @seckar seckar committed Oct 14, 2005
Showing with 4 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG
  2. +2 −1 railties/environments/boot.rb
View
@@ -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]
@@ -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"

0 comments on commit f2c7634

Please sign in to comment.