From 3c6b0d0287c81267cd5cf889f9ecdfb97b527799 Mon Sep 17 00:00:00 2001 From: beawesomeinstead Date: Fri, 22 Jan 2010 06:59:25 +0200 Subject: [PATCH] Moved default_form_builder accessor definition from action_view/helpers/form_helper.rb to action_view/base.rb. --- actionpack/lib/action_view/base.rb | 3 +++ actionpack/lib/action_view/helpers/form_helper.rb | 18 ------------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 4970c76..6bfe15b 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -18,6 +18,9 @@ module ActionView #:nodoc: end end + mattr_accessor :default_form_builder + self.default_form_builder = ::ActionView::Helpers::FormBuilder + # Action View templates can be written in three ways. If the template file has a .erb (or .rhtml) extension then it uses a mixture of ERb # (included in Ruby) and HTML. If the template file has a .builder (or .rxml) extension then Jim Weirich's Builder::XmlMarkup library is used. # If the template file has a .rjs extension then it will use ActionView::Helpers::PrototypeHelper::JavaScriptGenerator. diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 20e9916..2fa492e 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -1178,22 +1178,4 @@ module ActionView end end end - - class << ActionView - attr_accessor :default_form_builder - 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 -- 1.6.3.3