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
deprecate passing nil as model arg instead of raising ArgumentError #50931
Merged
jhawthorn
merged 2 commits into
rails:main
from
cjilbert504:deprecate-nil-form-with-model-arg
Feb 1, 2024
Merged
deprecate passing nil as model arg instead of raising ArgumentError #50931
jhawthorn
merged 2 commits into
rails:main
from
cjilbert504:deprecate-nil-form-with-model-arg
Feb 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
ghiculescu
reviewed
Feb 1, 2024
ghiculescu
reviewed
Feb 1, 2024
skipkayhil
reviewed
Feb 1, 2024
cjilbert504
force-pushed
the
deprecate-nil-form-with-model-arg
branch
2 times, most recently
from
February 1, 2024 13:38
8672817
to
5e91597
Compare
cjilbert504
force-pushed
the
deprecate-nil-form-with-model-arg
branch
from
February 1, 2024 13:40
5e91597
to
ffd6fcf
Compare
@ghiculescu @skipkayhil - Thank you both so much for the feedback/review/suggestions. This is my first time working with the deprecation warning stuff 😅. Anyway, I've made the changes requested. |
jhawthorn
reviewed
Feb 1, 2024
Thank you! |
Thanks @jhawthorn!!!! ❤️💎 |
4 tasks
Ridhwana
pushed a commit
to Ridhwana/rails
that referenced
this pull request
Mar 7, 2024
viralpraxis
pushed a commit
to viralpraxis/rails
that referenced
this pull request
Mar 24, 2024
carlosantoniodasilva
added a commit
to heartcombo/simple_form
that referenced
this pull request
Apr 9, 2024
Rails main changed `object` to be `false` instead of `nil`, causing the specific check we were doing for `object.nil?` to fail, and the custom errors were not displaying for forms without an object. Our test suite caught that, and the fix is to simply not check specifically for `nil?`, but just whether we have an object or not, which should account for both `nil`/`false` versions. It's a small backwards incompatibility, probably not something worth changing the framework for, but one worth mentioning. Source is likely to be: - rails/rails#49943 - rails/rails#50931
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Background
This Pull Request has been created because we want to first show a deprecation warning about changing the default value of the
model:
argument toform_with
Detail
This Pull Request removes the changes introduced in #49943 since these changes are breaking changes. Instead we will first deprecate the current default value of the
model:
argument inform_with
.Additional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]