Sha256: f28a9962ba60d735d470a93f958ccfcc77acc441896f51da2ba8b1129bb8efb3

Contents?: true

Size: 369 Bytes

Versions: 14

Compression:

Stored size: 369 Bytes

Contents

ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
  if html_tag.match("input")
    message = (error = instance.error_message).respond_to?(:join) ? error.join(",") : error
    %(<span class="error">
        #{html_tag}
        <span class="help-inline">
          #{message}
        </span>
      </span>
    ).html_safe
  else
    html_tag
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
doorkeeper-0.6.0.rc1 config/initializers/form_errors.rb
doorkeeper-0.5.0 config/initializers/form_errors.rb
doorkeeper-0.5.0.rc1 config/initializers/form_errors.rb
doorkeeper-0.4.2 config/initializers/form_errors.rb
doorkeeper-0.4.1 config/initializers/form_errors.rb
doorkeeper-0.4.0 config/initializers/form_errors.rb
doorkeeper-0.3.4 config/initializers/form_errors.rb
doorkeeper-0.3.3 config/initializers/form_errors.rb
doorkeeper-0.3.2 config/initializers/form_errors.rb
doorkeeper-0.3.1 config/initializers/form_errors.rb
doorkeeper-0.3.0 config/initializers/form_errors.rb
doorkeeper-0.2.0 config/initializers/form_errors.rb
doorkeeper-0.1.1 config/initializers/form_errors.rb
doorkeeper-0.1.0 config/initializers/form_errors.rb