Skip to content

Commit 4b9153c

Browse files
committed
type belongs_to_default in activerecord version 6.0
1 parent 2d1b7ab commit 4b9153c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

gems/activerecord/6.0/activerecord.rbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ module ActiveRecord
4242
extend ::ActiveRecord::Validations::ClassMethods
4343
extend ::ActiveSupport::Callbacks::ClassMethods
4444

45+
type belongs_to_default[T] = ^(T) [self: T] -> ::ActiveRecord::Base?
46+
4547
def self.abstract_class=: (bool) -> void
4648
def self.scope: (Symbol, Proc) ?{ () -> untyped } -> void
47-
def self.belongs_to: (Symbol, ?untyped, **untyped) -> void
49+
def self.belongs_to: (Symbol, ?untyped, **untyped, ?default: belongs_to_default[instance]) -> void
4850
def self.has_many: (Symbol, ?untyped, **untyped) -> void
4951
def self.has_one: (Symbol, ?untyped, **untyped) -> void
5052
def self.has_and_belongs_to_many: (untyped name, ?untyped? scope, **untyped options) ?{ () -> untyped } -> untyped

0 commit comments

Comments
 (0)