aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/initializer.rb8
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