aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-29 17:08:08 -0700
committerwycats <wycats@gmail.com>2010-03-29 17:08:50 -0700
commit4aded43b73ff94dbf06b4a2d2075651ce454e1d5 (patch)
tree6bac5b0c25e5186b6e92c04fb6e19550630bbe8a /actionpack/lib/action_view/helpers
parent331327d3919a633679dd3f434d13173fa8df010f (diff)
downloadrails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.tar.gz
rails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.tar.bz2
rails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.zip
Replace the placeholder base_hook API with on_load. To specify some code that
should run during framework load do: ActiveSupport.on_load(:action_controller) do # Code run in the context of AC::Base end
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/active_model_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/active_model_helper.rb b/actionpack/lib/action_view/helpers/active_model_helper.rb
index bbfac32322..44e193f18e 100644
--- a/actionpack/lib/action_view/helpers/active_model_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_model_helper.rb
@@ -6,7 +6,7 @@ require 'active_support/core_ext/kernel/reporting'
require 'active_support/core_ext/object/blank'
module ActionView
- ActionView.base_hook do
+ ActiveSupport.on_load(:action_view) do
class ActionView::Base
@@field_error_proc = Proc.new{ |html_tag, instance| "<div class=\"fieldWithErrors\">#{html_tag}</div>".html_safe }
cattr_accessor :field_error_proc
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 7b5b3ae000..89560d0b49 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1221,7 +1221,7 @@ module ActionView
end
end
- ActionView.base_hook do
+ ActiveSupport.on_load(:action_view) do
class ActionView::Base
cattr_accessor :default_form_builder
@@default_form_builder = ::ActionView::Helpers::FormBuilder