This project is archived and is in readonly mode.
Allow Rails.root to take arguments to build a path with File.join
Reported by Damian Janowski | November 26th, 2008 @ 02:29 PM | in 2.x
Rails.root
=> RAILS_ROOT
Rails.root('public', 'images', 'rails.png')
=> File.join(Rails.root, 'public', 'images', 'rails.png')
Comments and changes to this ticket
- 
            
        

Damian Janowski November 26th, 2008 @ 04:36 PM
- Assigned user set to DHH
 
 - 
            
        

 - 
        

Repository November 29th, 2008 @ 09:57 AM
- State changed from new to committed
 
(from [fdfcdf467387c4db3d79c1f46eadbb55a88ef814]) Enhanced Rails.root to take parameters that'll be join with the root, like Rails.root('app', 'controllers') => File.join(Rails.root, 'app', 'controllers') [#1482 state:committed] (Damian Janowski) http://github.com/rails/rails/co...
 - 
            
        

Damian Janowski November 29th, 2008 @ 11:54 PM
@DHH, I really think we should not call
#compacton the array. KeepingFile.join's API sounds better. (And I think there are potential security issues if we silently remove nils from args). - 
        

 - 
        

Repository December 1st, 2008 @ 02:10 AM
(from [be140e8c6be966349c6fa35a87f84d5a73995b9a]) Changed Rails.root to return a Pathname object (allows for Rails.root.join("app", "controllers") => "#{RAILS_ROOT}/app/controllers") [#1482] http://github.com/rails/rails/co...
 
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 
        
          1482 
          Allow Rails.root to take arguments to build a path with File.join
        (from [fdfcdf467387c4db3d79c1f46eadbb55a88ef814]) Enhance...
         - 
        
          1482 
          Allow Rails.root to take arguments to build a path with File.join
        (from [be140e8c6be966349c6fa35a87f84d5a73995b9a]) Changed...