padrino/padrino-framework — pull request #855 by sshaw (2012-05-28 07:55:05+00:00)
Title: error_message_on should check for empty collection

`ActiveModel::Validations` will return an empty array if there are no errors.

Currently `error_message_on` checks for a non-nil value before rendering an error message:
https://github.com/padrino/padrino-framework/blob/master/padrino-helpers/lib/padrino-helpers/form_helpers.rb#L247

Empty arrays will cause the error HTML to be generated.