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...
dhh committed May 31, 2010
1 parent 1854209 commit ea037ff55791a33d24773efd380b734f733c2815
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 ea037ff

Please sign in to comment.