Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ailable to set for config
  • Loading branch information...
commit 19d1d42daf64021221a558d6e33dfb46dddc8bfe 1 parent de50ba2
@dhh dhh authored mikel committed
View
4 actionpack/lib/action_view/base.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
View
7 actionpack/lib/action_view/helpers/active_model_helper.rb
@@ -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|
Please sign in to comment.
Something went wrong with that request. Please try again.