diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-13 17:33:27 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-13 17:33:27 -0500 |
commit | 420c4b3d8878156d04f45e47050ddc62ae00c68c (patch) | |
tree | e56d27d2078a7553b161a1088594e147e25ed2da /railties | |
parent | be7fd8168aa4776dccfe2e670cb9451204449dd4 (diff) | |
download | rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.tar.gz rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.tar.bz2 rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.zip |
Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger]
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 86b30244ba..a21bfc72dd 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger] + * rake time:zones:local finds correct base utc offset for zones in the Southern Hemisphere [Geoff Buesing] * Don't require rails/gem_builder during rails initialization, it's only needed for the gems:build task. [rick] diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 8a5ca6f91b..18af73fc89 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -38,6 +38,14 @@ module Rails def cache RAILS_CACHE end + + def public_path + @@public_path ||= File.join(self.root, "public") + end + + def public_path=(path) + @@public_path = path + end end # The Initializer is responsible for processing the Rails configuration, such |