Skip to content

Commit 68648c0

Browse files
authored
Make ActiveRecord::Associations::ClassMethods#has_many block optional (#549)
Also `has_many_and_belongs_to`
1 parent 1663d48 commit 68648c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gems/activerecord/6.0/activerecord-generated.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3558,7 +3558,7 @@ module ActiveRecord
35583558
# has_many :tags, as: :taggable
35593559
# has_many :reports, -> { readonly }
35603560
# has_many :subscribers, through: :subscriptions, source: :user
3561-
def has_many: (untyped name, ?untyped? scope, **untyped options) { () -> untyped } -> untyped
3561+
def has_many: (untyped name, ?untyped? scope, **untyped options) ?{ () -> untyped } -> untyped
35623562

35633563
# Specifies a one-to-one association with another class. This method should only be used
35643564
# if the other class contains the foreign key. If the current class contains the foreign key,
@@ -4005,7 +4005,7 @@ module ActiveRecord
40054005
# has_and_belongs_to_many :nations, class_name: "Country"
40064006
# has_and_belongs_to_many :categories, join_table: "prods_cats"
40074007
# has_and_belongs_to_many :categories, -> { readonly }
4008-
def has_and_belongs_to_many: (untyped name, ?untyped? scope, **untyped options) { () -> untyped } -> untyped
4008+
def has_and_belongs_to_many: (untyped name, ?untyped? scope, **untyped options) ?{ () -> untyped } -> untyped
40094009
end
40104010
end
40114011
end

0 commit comments

Comments
 (0)