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

Add belongs_to optional/required support to required? #3717

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RaymondFFT
Copy link

Active Record 7.1.0.beta1 added a lambda to the presence validation added by a belongs_to association. This lambda is only an optimisation to not check presence if the column is unchanged, however it stops RailsAdmin from treating the column as required.

As of Active Record 7.1.0.beta1, the presence validation added by a
belongs_to association can now have an associated lambda. This lambda is
just to check whether the column has changed to save redundant
validations, so we can ignore it.
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.

1 participant