lib/formtastic/custom_attributes.rb in custom-attributes-0.2.23 vs lib/formtastic/custom_attributes.rb in custom-attributes-0.2.24

- old
+ new

@@ -200,11 +200,17 @@ errors = [options[:errors][:value]] errors = errors.flatten.compact.uniq error_listing = send(:"error_#{self.class.inline_errors}", [*errors]) if errors.any? end - template.send(method, field_name_for(attribute_type, "value", index), value) << - custom_attribute_delete_link(attribute_human_name) << error_listing + result = "".html_safe + result << (options[:prefix] + " ").html_safe if options[:prefix] + result << template.send(method, field_name_for(attribute_type, "value", index), value) + result << (" " + options[:suffix]).html_safe if options[:suffix] + + result << custom_attribute_delete_link(attribute_human_name) << error_listing + + result end delegate :content_tag, :to => :template end \ No newline at end of file