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

Check AR validators to decide if a field is required #128

Closed
wants to merge 1 commit into from

Conversation

ccabot
Copy link
Collaborator

@ccabot ccabot commented Nov 9, 2010

This should close issue 89 and issue 121.

…uired

Previously, a field's "required" or "optional" status in the
create/edit form was based only on that field's nullable status in the
database schema.  This led to cases where a field was indicated
"optional" but you'd get an error if you tried to save with that field
empty.  This commit adds checks for two kinds of validations:
ActiveModel::Validations::PresenceValidator and
ActiveModel::Validations::NumericalityValidator with
:allow_nil=>false.  There might well be other validations that cause
the fields to be required, but these are the two that I know about.
@sferik
Copy link
Collaborator

sferik commented Nov 9, 2010

Looks good. Do you have any interest in being added as a committer? I'm getting tired of accepting your pull requests. ;)

@ccabot
Copy link
Collaborator Author

ccabot commented Nov 9, 2010

Yes, please, although I'll probably continue to hassle you and the other committers for code reviews.

@sferik
Copy link
Collaborator

sferik commented Nov 9, 2010

Added! I'm always happy to give a code review.

In general, please leave pull requests for me to merge but feel free to push your own code directly to master.

@ccabot
Copy link
Collaborator Author

ccabot commented Nov 9, 2010

Thank you!

@kaapa
Copy link
Collaborator

kaapa commented Nov 9, 2010

Welcome aboard on my behalf as well! :)

@mulaiko mulaiko mentioned this pull request Sep 11, 2014
grillermo added a commit to go-tandem/rails_admin that referenced this pull request Jun 2, 2015
…-without-payment-method

Feature/redirect without payment method
This pull request was closed.
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.

3 participants