lib/scaffolding_extensions/helper.rb
# A html fragment containing a paragraph stating there were errors for the @scaffold_object
# and an unordered list with error messages for that object.  If there are no errors,
# returns an empty string.
A html fragment containing a paragraph stating there were errors for the @scaffold_object
and an unordered list with error messages for that object.  If there are no errors,
returns an empty string.
A html fragment containing a paragraph stating there were errors for the @scaffold_object and an unordered list with error messages for that object . If there are no errors returns an empty string .
def scaffold_model_error_messages
        return '' unless (errors = @scaffold_object.scaffold_error_messages).length > 0
        content = '<p>There were problems with the following fields:</p><ul>'
        errors.each{|msg| content << "<li>#{msg}</li>"}
        content << '</ul>'
        content
      end
def scaffold_model_error_messages return '' unless ( errors = @scaffold_object . scaffold_error_messages ) . length > 0 content = '<p>There were problems with the following fields:</p><ul>' errors . each { | msg | content << "<li>#{msg}</li>" } content << '</ul>' content end
A html fragment containing a paragraph stating there were errors for the @scaffold_object
and an unordered list with error messages for that object.
A html fragment containing a paragraph stating there were errors for the @scaffold_object and an unordered list with error messages for that object .