Project

General

Profile

« Previous | Next » 

Revision 0345ef19

Added by Amos Benari almost 12 years ago

  • ID 0345ef1984e16889d4de8e25e19ea4396361eb14

fixes #1730 broken ui when errors and help inline.

View differences:

app/helpers/layout_helper.rb
def field(f, attr, options = {})
error = f.object.errors[attr] if f.object.respond_to?(:errors)
inline = error.empty? ? options.delete(:help_inline) : error.to_sentence.html_safe
inline = options.delete(:help_inline)
inline = error.to_sentence.html_safe unless error.empty?
help_inline = inline.blank? ? '' : content_tag(:span, inline, :class => "help-inline")
help_block = content_tag(:span, options.delete(:help_block), :class => "help-block")
content_tag :div, :class => "control-group #{error.empty? ? "" : 'error'}" do

Also available in: Unified diff