Skip to content
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
Merged

error_message_on should check for empty Array #855

merged 1 commit into from Jun 11, 2012

Conversation

sshaw
Copy link
Contributor

@sshaw 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
error_message_on should check for empty Array
@DAddYE DAddYE merged commit c106ad0 into padrino:master Jun 11, 2012
@DAddYE
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants