Browse files

Change config implementation in AV slightly

  • Loading branch information...
1 parent 02b7686 commit e1490d4e4c60211173d51e7b21c16dbe4c2d942a @wycats wycats committed Oct 15, 2009
Showing with 11 additions and 2 deletions.
  1. +1 −1 actionmailer/test/abstract_unit.rb
  2. +10 −1 actionpack/lib/action_view/base.rb
View
2 actionmailer/test/abstract_unit.rb
@@ -20,7 +20,7 @@
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"
View
11 actionpack/lib/action_view/base.rb
@@ -167,7 +167,16 @@ class Base
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

0 comments on commit e1490d4

Please sign in to comment.