aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionmailer/test/abstract_unit.rb2
-rw-r--r--actionpack/lib/action_view/base.rb11
2 files changed, 11 insertions, 2 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index a226054194..7843623996 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -20,7 +20,7 @@ ActiveSupport::Deprecation.debug = true
ActionView::Template.register_template_handler :haml, lambda { |template| "Look its HAML!".inspect }
ActionView::Template.register_template_handler :bak, lambda { |template| "Lame backup".inspect }
-ActionView::Base.config = { :assets_dir => '/nowhere' }
+ActionView::Base::DEFAULT_CONFIG = { :assets_dir => '/nowhere' }
$:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers"
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 58dae0bb0f..84e4103280 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -167,7 +167,16 @@ module ActionView #:nodoc:
module Subclasses
end
- include Helpers, Rendering, Partials, ::ERB::Util, ActiveSupport::Configurable
+ include Helpers, Rendering, Partials, ::ERB::Util
+
+ def config
+ self.config = DEFAULT_CONFIG unless @config
+ @config
+ end
+
+ def config=(config)
+ @config = ActiveSupport::OrderedOptions.new.merge(config)
+ end
extend ActiveSupport::Memoizable