New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error_message_on should check for empty Array #855

Merged
merged 1 commit into from Jun 11, 2012

Conversation

Projects
None yet
2 participants
@sshaw
Contributor

sshaw commented May 28, 2012

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.

DAddYE added a commit that referenced this pull request Jun 11, 2012

Merge pull request #855 from sshaw/master
error_message_on should check for empty Array

@DAddYE DAddYE merged commit c106ad0 into padrino:master Jun 11, 2012

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Jun 11, 2012

Member

Thanks also for make a test!

Member

DAddYE commented Jun 11, 2012

Thanks also for make a test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment