Sha256: cb0f4f99fc749d3a564cd7ea53fb8c10796807e2e557dd18c3b2f24a1b46b612

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
  if html_tag =~ /<(input|textarea|select)/
    %|<div class="control-group error">#{html_tag} <span class="help-inline">#{[instance.error_message].join(', ')}</span></div>|.html_safe
  elsif html_tag =~ /<label/
    %|<div class="control-group error">#{html_tag}|.html_safe
  else
    html_tag
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flexi_generators-0.3.0 lib/generators/flexi/config/templates/field_error.rb