Cleanup project for Rails 7+ support #594
Merged
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.
Recommended to review with white space off - most of the changes are adjustments to indentation as a result of removing several
ifconditions against versions of Rails. Also recommended to review commit by commit.Support was dropped for EOL Ruby and Rails versions back in September in #570. Part of the motivation to do this was to address some test issues in another PR. Since then, nothing below Ruby 3.0 and Rails 7.0 run as part of the test matrix. Given that the project no longer runs validation against older versions of Ruby and Rails, compatibility can no longer be guaranteed. I think it makes sense to update the project to reflect this reality.
A summary of the changes:
gemspechas been updated to specify Ruby 3.0 is the minimum version, as well as specifying 7.0 as the minimum versions for bothactivesupportandactionview, since this is what the test matrix actually runs against.ifconditions against Ruby/Rails versions that would always betruein the test matrix. Likewise, conditions and assertions for older versions have been removed since they would no longer be running under the test matrix.CollectionRendererhas been refactored to trust that::ActionView::CollectionRendererexists, which is the case for Rails 7+. This allows us to remove the::ActionView::PartialRenderershim which also allows us to remove the branch of logic inJbuilderTemplatewhereCollectionRenderer.supported?isfalse, which will never be the case anymore in Rails 7+.