File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
actionpack/lib/action_view Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,10 @@ module Subclasses
165
165
cattr_accessor :debug_rjs
166
166
@@debug_rjs = false
167
167
168
+ # Specify the proc used to decorate input tags that refer to attributes with errors.
169
+ cattr_accessor :field_error_proc
170
+ @@field_error_proc = Proc . new { |html_tag , instance | "<div class=\" field_with_errors\" >#{ html_tag } </div>" . html_safe }
171
+
168
172
class_attribute :helpers
169
173
remove_method :helpers
170
174
attr_reader :helpers
Original file line number Diff line number Diff line change 4
4
require 'active_support/core_ext/object/blank'
5
5
6
6
module ActionView
7
- ActiveSupport . on_load ( :action_view ) do
8
- class ActionView ::Base
9
- @@field_error_proc = Proc . new { |html_tag , instance | "<div class=\" field_with_errors\" >#{ html_tag } </div>" . html_safe }
10
- cattr_accessor :field_error_proc
11
- end
12
- end
13
-
14
7
module Helpers
15
8
module ActiveModelHelper
16
9
%w( input form error_messages_for error_message_on ) . each do |method |
You can’t perform that action at this time.
0 commit comments