diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-02 11:32:28 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-02 11:32:28 +0100 |
commit | 95eadb39bd2abe986f0981a8e03c317ec9c1bca0 (patch) | |
tree | 71c6afa05b5c0ec87a5af5cfb6e01844df225f19 /actionpack/lib/action_view/helpers | |
parent | ec4b18ec78618fdd1c4fbfd7fc538ea3fb7ccbc4 (diff) | |
download | rails-95eadb39bd2abe986f0981a8e03c317ec9c1bca0.tar.gz rails-95eadb39bd2abe986f0981a8e03c317ec9c1bca0.tar.bz2 rails-95eadb39bd2abe986f0981a8e03c317ec9c1bca0.zip |
Configuration values should be on AV::Base.
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 76998a6ea1..c2ad7e9f77 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -528,7 +528,7 @@ module ActionView object_name = ActionController::RecordIdentifier.singular_class_name(object) end - builder = options[:builder] || ActionView.default_form_builder + builder = options[:builder] || ActionView::Base.default_form_builder yield builder.new(object_name, object, self, options, block) end @@ -1208,21 +1208,8 @@ module ActionView end end - class << ActionView - attr_accessor :default_form_builder + class Base + cattr_accessor :default_form_builder + @@default_form_builder = ::ActionView::Helpers::FormBuilder end - - self.default_form_builder = ::ActionView::Helpers::FormBuilder - - # 2.3 compatibility - class << Base - def default_form_builder=(builder) - ActionView.default_form_builder = builder - end - - def default_form_builder - ActionView.default_form_builder - end - end - end |