Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit f2c7634db58b52f8d0415a7002976089fea3191c 1 parent 29d4c2b
@seckar seckar authored
Showing with 4 additions and 1 deletion.
  1. +2 −0  railties/CHANGELOG
  2. +2 −1  railties/environments/boot.rb
View
2  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]
View
3  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"
Please sign in to comment.
Something went wrong with that request. Please try again.