Permalink
Browse files

Base options cant live in lazy loaded helpers as they then wont be av…

…ailable to set for config
  • Loading branch information...
1 parent de50ba2 commit 19d1d42daf64021221a558d6e33dfb46dddc8bfe @dhh dhh committed with mikel May 31, 2010
Showing with 4 additions and 7 deletions.
  1. +4 −0 actionpack/lib/action_view/base.rb
  2. +0 −7 actionpack/lib/action_view/helpers/active_model_helper.rb
@@ -165,6 +165,10 @@ module Subclasses
cattr_accessor :debug_rjs
@@debug_rjs = false
+ # Specify the proc used to decorate input tags that refer to attributes with errors.
+ cattr_accessor :field_error_proc
+ @@field_error_proc = Proc.new{ |html_tag, instance| "<div class=\"field_with_errors\">#{html_tag}</div>".html_safe }
+
class_attribute :helpers
remove_method :helpers
attr_reader :helpers
@@ -4,13 +4,6 @@
require 'active_support/core_ext/object/blank'
module ActionView
- ActiveSupport.on_load(:action_view) do
- class ActionView::Base
- @@field_error_proc = Proc.new{ |html_tag, instance| "<div class=\"field_with_errors\">#{html_tag}</div>".html_safe }
- cattr_accessor :field_error_proc
- end
- end
-
module Helpers
module ActiveModelHelper
%w(input form error_messages_for error_message_on).each do |method|

0 comments on commit 19d1d42

Please sign in to comment.