lib/formtastic/inputs/base/errors.rb in formtastic-2.3.1 vs lib/formtastic/inputs/base/errors.rb in formtastic-3.0.0.rc

- old
+ new

@@ -6,24 +6,24 @@ def error_html errors? ? send(:"error_#{builder.inline_errors}_html") : "" end def error_sentence_html - error_class = options[:error_class] || builder.default_inline_error_class + error_class = builder.default_inline_error_class template.content_tag(:p, Formtastic::Util.html_safe(errors.to_sentence.html_safe), :class => error_class) end def error_list_html - error_class = options[:error_class] || builder.default_error_list_class + error_class = builder.default_error_list_class list_elements = [] errors.each do |error| list_elements << template.content_tag(:li, Formtastic::Util.html_safe(error.html_safe)) end template.content_tag(:ul, Formtastic::Util.html_safe(list_elements.join("\n")), :class => error_class) end def error_first_html - error_class = options[:error_class] || builder.default_inline_error_class + error_class = builder.default_inline_error_class template.content_tag(:p, Formtastic::Util.html_safe(errors.first.untaint), :class => error_class) end def error_none_html ""