Commit b5efb03
committed
Add ActiveRecord::Relation#table_name type
## Overview
`ActiveRecord::Relation#table_name` is delegated to the model class via `method_missing`, but it was not defined in the RBS type definitions. This causes Steep to report a `NoMethodError` when calling `table_name` on a Relation instance.
This PR adds the `table_name` method definition to `ActiveRecord::Relation` with a return type of `String`.
## References
- Source: `ActiveRecord::ModelSchema::ClassMethods#table_name`
- https://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-table_name
- https://github.com/rails/rails/blob/v7.0.8/activerecord/lib/active_record/model_schema.rb#L247-L2501 parent 9c796e7 commit b5efb03
File tree
5 files changed
+10
-0
lines changed- gems/activerecord
- 6.0
- 7.2
- _test
- 8.0
- _test
5 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
| 411 | + | |
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
| 411 | + | |
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
| |||
0 commit comments