Sha256: d7d371fe614e8543356064bdf2afb2d3b46bbe09e955de85ce1473ef3ec7725b

Contents?: true

Size: 261 Bytes

Versions: 12

Compression:

Stored size: 261 Bytes

Contents

ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
  class_attr_index = html_tag.index 'class="'

  if class_attr_index
    html_tag.insert class_attr_index+7, 'error '
  else
    html_tag.insert html_tag.index('>'), ' class="error"'
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
headmin-0.2.9 config/initializers/customize_input_error.rb
headmin-0.3.2 config/initializers/customize_input_error.rb
headmin-0.3.1 config/initializers/customize_input_error.rb
headmin-0.2.8 config/initializers/customize_input_error.rb
headmin-0.2.7 config/initializers/customize_input_error.rb
headmin-0.2.6 config/initializers/customize_input_error.rb
headmin-0.2.5 config/initializers/customize_input_error.rb
headmin-0.2.4 config/initializers/customize_input_error.rb
headmin-0.2.3 config/initializers/customize_input_error.rb
headmin-0.2.2 config/initializers/customize_input_error.rb
headmin-0.2.1 config/initializers/customize_input_error.rb
headmin-0.2.0 config/initializers/customize_input_error.rb