aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-12-09 13:40:45 +0100
committerJosé Valim <jose.valim@gmail.com>2010-12-09 13:40:45 +0100
commit8e6d27641cf213a13d51491cecfbfa1d3c8822fd (patch)
treea9c027e17400fb18676c1b5dc3005669d4ec590d
parentcc70ac9508dff6a4406f446d7a53d05f6c7d9f61 (diff)
downloadrails-8e6d27641cf213a13d51491cecfbfa1d3c8822fd.tar.gz
rails-8e6d27641cf213a13d51491cecfbfa1d3c8822fd.tar.bz2
rails-8e6d27641cf213a13d51491cecfbfa1d3c8822fd.zip
Clean up asset_host and asset_path.
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb4
-rw-r--r--actionpack/lib/action_controller/railtie.rb4
-rw-r--r--railties/lib/rails/application/configuration.rb19
3 files changed, 7 insertions, 20 deletions
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb
index d67a5b6521..4ec478067f 100644
--- a/actionmailer/lib/action_mailer/railtie.rb
+++ b/actionmailer/lib/action_mailer/railtie.rb
@@ -19,8 +19,8 @@ module ActionMailer
options.stylesheets_dir ||= paths["public/stylesheets"].first
# make sure readers methods get compiled
- options.asset_path ||= nil
- options.asset_host ||= nil
+ options.asset_path ||= app.config.asset_path
+ options.asset_host ||= app.config.asset_host
ActiveSupport.on_load(:action_mailer) do
include AbstractController::UrlFor
diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb
index c5a661f2b0..f0c29825ba 100644
--- a/actionpack/lib/action_controller/railtie.rb
+++ b/actionpack/lib/action_controller/railtie.rb
@@ -27,8 +27,8 @@ module ActionController
options.page_cache_directory ||= paths["public"].first
# make sure readers methods get compiled
- options.asset_path ||= nil
- options.asset_host ||= nil
+ options.asset_path ||= app.config.asset_path
+ options.asset_host ||= app.config.asset_host
ActiveSupport.on_load(:action_controller) do
include app.routes.mounted_helpers
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index 3505388479..8cd496781b 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -4,12 +4,12 @@ require 'rails/engine/configuration'
module Rails
class Application
class Configuration < ::Rails::Engine::Configuration
- attr_accessor :allow_concurrency, :cache_classes, :cache_store,
+ attr_accessor :allow_concurrency, :asset_host, :cache_classes, :cache_store,
:encoding, :consider_all_requests_local, :dependency_loading,
- :filter_parameters, :log_level, :logger,
+ :filter_parameters, :helpers_paths, :log_level, :logger,
:preload_frameworks, :reload_plugins,
:secret_token, :serve_static_assets, :session_options,
- :time_zone, :whiny_nils, :helpers_paths
+ :time_zone, :whiny_nils
def initialize(*)
super
@@ -24,22 +24,9 @@ module Rails
@session_options = {}
@time_zone = "UTC"
@middleware = app_middleware
- @asset_path = '/'
@generators = app_generators
end
- def asset_path=(value)
- action_mailer.asset_path = value if respond_to?(:action_mailer) && action_mailer
- action_controller.asset_path = value if respond_to?(:action_controller) && action_controller
- super(value)
- end
-
- def asset_host=(value)
- action_mailer.asset_host = value if action_mailer
- action_controller.asset_host = value if action_controller
- super(value)
- end
-
def compiled_asset_path
"/"
end