Skip to content

Merge - #1

Open
arturdsm wants to merge 389 commits into
arturdsm:masterfrom
motor-admin:master
Open

arturdsm wants to merge 389 commits into
arturdsm:masterfrom
motor-admin:master

Conversation

@arturdsm

Copy link
Copy Markdown
Owner

No description provided.

@omohokcoj
omohokcoj force-pushed the master branch 2 times, most recently from 6d8aa16 to f65f455 Compare November 11, 2021 12:33
@omohokcoj
omohokcoj force-pushed the master branch 2 times, most recently from 7f549df to a211adf Compare November 29, 2021 15:43
@omohokcoj
omohokcoj force-pushed the master branch 2 times, most recently from 38747bf to 6813988 Compare December 21, 2021 17:45
@omohokcoj
omohokcoj force-pushed the master branch 5 times, most recently from 7ea4acc to 1c625ab Compare December 29, 2021 19:11
omohokcoj and others added 3 commits June 18, 2025 00:02
Rails 8.0 removed the reflection parameter from TableMetadata#initialize
as part of Rails commit e8b3164fc973a576315a57ba29918d9e2b97a8da.

This change dynamically detects the arity of TableMetadata#initialize
and calls it with either 2 arguments (Rails 8.0+) or 3 arguments (Rails 7.x)
to maintain compatibility across both versions.

The reflection delegation was removed in Rails 8 because the reflection
instance is already available where needed in the predicate builder,
making the delegation through TableMetadata unnecessary.

Reference:
rails/rails@e8b3164

Changes:
- Add build_table_metadata helper method with arity detection
- Cache reflection support check for performance
- Refactor duplicated builder creation code for better readability
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.