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

Form error_messages always displays error messages #1184

Closed
postmodern opened this Issue Mar 25, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@postmodern
Contributor

postmodern commented Mar 25, 2013

Using padrino 0.11.0 with DataMapper and noticed that f.error_messages always states there are validation errors on the new Resource, but does not specify the exact errors.

2 errors prohibited this Discovery from being saved

There were problems with the following fields:

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Mar 26, 2013

Member

Interesting, will take a look soon and hopefully get to the bottom of this.

Member

nesquena commented Mar 26, 2013

Interesting, will take a look soon and hopefully get to the bottom of this.

@nesquena nesquena closed this in d70f949 Mar 26, 2013

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Mar 26, 2013

Member

OK I see, datamapper has a somewhat annoying issue where errors.size returns 2 even though there's no errors. Switching to count fixes it. @postmodern can you confirm on edge?

Member

nesquena commented Mar 26, 2013

OK I see, datamapper has a somewhat annoying issue where errors.size returns 2 even though there's no errors. Switching to count fixes it. @postmodern can you confirm on edge?

@postmodern

This comment has been minimized.

Show comment
Hide comment
@postmodern

postmodern Mar 26, 2013

Contributor

Confirmed fixed on edge.

Contributor

postmodern commented Mar 26, 2013

Confirmed fixed on edge.

WaYdotNET added a commit to WaYdotNET/padrino-framework that referenced this issue Mar 26, 2013

Merge remote-tracking branch 'upstream/master' into all-custom-error
* upstream/master:
  have plugin generator respect root option
  Fix very strange bug with form_for and capture_html @ujifgc #1177
  [padrino-core/rake] Adds lib as a load_path for rake tasks #1185
  [form_helpers] Use count instead of size (Closes #1184)
  [format_helpers] Mark escaped text as html_safe (Closes #1183)
  Closes #1179 for accidental appended extensions for js urls
  format activerecord migrate
  formatting activerecord migration test
  Thanks to @kenkeiter for bringing up the fact that http_router [is missing PATCH](https://github.com/joshbuddy/http_router/blob/master/lib/http_router/route.rb#L5).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment