-
Notifications
You must be signed in to change notification settings - Fork 110
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
activerecord: Allow to use array of Hashes to #preload #700
Conversation
@tk0miya Thanks for your contribution! Please follow the instructions below for each change. Available commandsYou can use the following commands by commenting on this PR.
|
@@ -296,6 +296,8 @@ module ActiveRecord | |||
end | |||
|
|||
module QueryMethods | |||
type includee = String | Symbol | Array[includee] | Hash[untyped, untyped] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is the best place for this type alias. I'd really appreciate if you give me your opinion.
Thanks,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the place is good.
Please be aware that recurrent definitions may have bugs and performance risks.
soutaro/steep#1055
(Personally, I am fine with untyped
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion of accuracy. So I'm okay to stop using recurrent definitions like this.
type includee = String | Symbol | Array[includee] | Hash[untyped, untyped] | |
type includee = String | Symbol | Array[untyped] | Hash[untyped, untyped] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, I removed includee
type alias. It's only needed for recurrent definitions.
ad5dd9f
to
d005e80
Compare
d005e80
to
4bc9b76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPROVE
/merge |
The type of ActiveStorage::Current is now registered to gem_rbs_collection. And the type of #preload of active record models is also fixed. * ruby/gem_rbs_collection#702 * ruby/gem_rbs_collection#700
The type of ActiveStorage::Current is now registered to gem_rbs_collection. And the type of #preload of active record models is also fixed. * ruby/gem_rbs_collection#702 * ruby/gem_rbs_collection#700
The real use case is here: https://github.com/kaigionrails/conference-app/pull/341/files#r1817211252