Skip to content

Commit

Permalink
activerecord: CollectionProxy#build can take an array of EachPair
Browse files Browse the repository at this point in the history
As described above, `CollectionProxy#build` takes an array of attributes
and returns list of instances of the model.
  • Loading branch information
tk0miya committed Nov 16, 2024
1 parent 9b07b7b commit b276a20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gems/activerecord/6.0/activerecord.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,8 @@ module ActiveRecord
#
# person.pets.size # => 5 # size of the collection
# person.pets.count # => 0 # count from database
def build: (?_EachPair attributes) ?{ () -> untyped } -> untyped
def build: (Array[_EachPair] attributes) ?{ () -> untyped } -> Array[untyped]
| (?_EachPair attributes) ?{ () -> untyped } -> untyped

alias new build

Expand Down

0 comments on commit b276a20

Please sign in to comment.