sorbet-rails 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +28 -1
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_utils.rb +1 -1
- data/sorbet-rails.gemspec +1 -1
- data/spec/generators/sorbet_test_cases.rb +16 -8
- data/spec/support/v5.0/Gemfile.lock +2 -2
- data/spec/support/v5.0/sorbet_test_cases.rb +16 -8
- data/spec/support/v5.1/Gemfile.lock +2 -2
- data/spec/support/v5.1/sorbet_test_cases.rb +16 -8
- data/spec/support/v5.2/Gemfile.lock +2 -2
- data/spec/support/v5.2/sorbet_test_cases.rb +16 -8
- data/spec/support/v6.0/Gemfile.lock +2 -2
- data/spec/support/v6.0/sorbet_test_cases.rb +16 -8
- data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.0/expected_headmaster.rbi +24 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +24 -0
- data/spec/test_data/v5.0/expected_potion.rbi +24 -0
- data/spec/test_data/v5.0/expected_robe.rbi +24 -0
- data/spec/test_data/v5.0/expected_schema_migration.rbi +24 -0
- data/spec/test_data/v5.0/expected_school.rbi +24 -0
- data/spec/test_data/v5.0/expected_spell.rbi +24 -0
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +24 -0
- data/spec/test_data/v5.0/expected_spell_book.rbi +24 -0
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +24 -0
- data/spec/test_data/v5.0/expected_squib.rbi +24 -0
- data/spec/test_data/v5.0/expected_subject.rbi +24 -0
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +24 -0
- data/spec/test_data/v5.0/expected_wand.rbi +24 -0
- data/spec/test_data/v5.0/expected_wizard.rbi +24 -0
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +24 -0
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +24 -0
- data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.1/expected_headmaster.rbi +24 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +24 -0
- data/spec/test_data/v5.1/expected_potion.rbi +24 -0
- data/spec/test_data/v5.1/expected_robe.rbi +24 -0
- data/spec/test_data/v5.1/expected_schema_migration.rbi +24 -0
- data/spec/test_data/v5.1/expected_school.rbi +24 -0
- data/spec/test_data/v5.1/expected_spell.rbi +24 -0
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +24 -0
- data/spec/test_data/v5.1/expected_spell_book.rbi +24 -0
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +24 -0
- data/spec/test_data/v5.1/expected_squib.rbi +24 -0
- data/spec/test_data/v5.1/expected_subject.rbi +24 -0
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +24 -0
- data/spec/test_data/v5.1/expected_wand.rbi +24 -0
- data/spec/test_data/v5.1/expected_wizard.rbi +24 -0
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +24 -0
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +24 -0
- data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.2/expected_attachment.rbi +24 -0
- data/spec/test_data/v5.2/expected_blob.rbi +24 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +24 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +24 -0
- data/spec/test_data/v5.2/expected_potion.rbi +24 -0
- data/spec/test_data/v5.2/expected_robe.rbi +24 -0
- data/spec/test_data/v5.2/expected_schema_migration.rbi +24 -0
- data/spec/test_data/v5.2/expected_school.rbi +24 -0
- data/spec/test_data/v5.2/expected_spell.rbi +24 -0
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +24 -0
- data/spec/test_data/v5.2/expected_spell_book.rbi +24 -0
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +24 -0
- data/spec/test_data/v5.2/expected_squib.rbi +24 -0
- data/spec/test_data/v5.2/expected_subject.rbi +24 -0
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +24 -0
- data/spec/test_data/v5.2/expected_wand.rbi +24 -0
- data/spec/test_data/v5.2/expected_wizard.rbi +24 -0
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +24 -0
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +24 -0
- data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
- data/spec/test_data/v6.0/expected_attachment.rbi +24 -0
- data/spec/test_data/v6.0/expected_blob.rbi +74 -38
- data/spec/test_data/v6.0/expected_headmaster.rbi +24 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +24 -0
- data/spec/test_data/v6.0/expected_potion.rbi +24 -0
- data/spec/test_data/v6.0/expected_robe.rbi +24 -0
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +24 -0
- data/spec/test_data/v6.0/expected_school.rbi +24 -0
- data/spec/test_data/v6.0/expected_spell.rbi +24 -0
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +24 -0
- data/spec/test_data/v6.0/expected_spell_book.rbi +119 -53
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +24 -0
- data/spec/test_data/v6.0/expected_squib.rbi +346 -100
- data/spec/test_data/v6.0/expected_subject.rbi +24 -0
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +24 -0
- data/spec/test_data/v6.0/expected_wand.rbi +128 -56
- data/spec/test_data/v6.0/expected_wizard.rbi +346 -100
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +24 -0
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +346 -100
- metadata +1 -1
@@ -150,6 +150,18 @@ module Subject::QueryMethodsReturningRelation
|
|
150
150
|
|
151
151
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_Relation) }
|
152
152
|
def extending(*args, &block); end
|
153
|
+
|
154
|
+
sig do
|
155
|
+
params(
|
156
|
+
of: T.nilable(Integer),
|
157
|
+
start: T.nilable(Integer),
|
158
|
+
finish: T.nilable(Integer),
|
159
|
+
load: T.nilable(T::Boolean),
|
160
|
+
error_on_ignore: T.nilable(T::Boolean),
|
161
|
+
block: T.nilable(T.proc.params(e: Subject::ActiveRecord_Relation).void)
|
162
|
+
).returns(T::Enumerable[Subject::ActiveRecord_Relation])
|
163
|
+
end
|
164
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
153
165
|
end
|
154
166
|
|
155
167
|
module Subject::QueryMethodsReturningAssociationRelation
|
@@ -239,6 +251,18 @@ module Subject::QueryMethodsReturningAssociationRelation
|
|
239
251
|
|
240
252
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_AssociationRelation) }
|
241
253
|
def extending(*args, &block); end
|
254
|
+
|
255
|
+
sig do
|
256
|
+
params(
|
257
|
+
of: T.nilable(Integer),
|
258
|
+
start: T.nilable(Integer),
|
259
|
+
finish: T.nilable(Integer),
|
260
|
+
load: T.nilable(T::Boolean),
|
261
|
+
error_on_ignore: T.nilable(T::Boolean),
|
262
|
+
block: T.nilable(T.proc.params(e: Subject::ActiveRecord_AssociationRelation).void)
|
263
|
+
).returns(T::Enumerable[Subject::ActiveRecord_AssociationRelation])
|
264
|
+
end
|
265
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
242
266
|
end
|
243
267
|
|
244
268
|
class Subject::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -153,6 +153,18 @@ module Subject::HABTM_Wizards::QueryMethodsReturningRelation
|
|
153
153
|
|
154
154
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
|
155
155
|
def extending(*args, &block); end
|
156
|
+
|
157
|
+
sig do
|
158
|
+
params(
|
159
|
+
of: T.nilable(Integer),
|
160
|
+
start: T.nilable(Integer),
|
161
|
+
finish: T.nilable(Integer),
|
162
|
+
load: T.nilable(T::Boolean),
|
163
|
+
error_on_ignore: T.nilable(T::Boolean),
|
164
|
+
block: T.nilable(T.proc.params(e: Subject::HABTM_Wizards::ActiveRecord_Relation).void)
|
165
|
+
).returns(T::Enumerable[Subject::HABTM_Wizards::ActiveRecord_Relation])
|
166
|
+
end
|
167
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
156
168
|
end
|
157
169
|
|
158
170
|
module Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
|
@@ -242,6 +254,18 @@ module Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
|
|
242
254
|
|
243
255
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
|
244
256
|
def extending(*args, &block); end
|
257
|
+
|
258
|
+
sig do
|
259
|
+
params(
|
260
|
+
of: T.nilable(Integer),
|
261
|
+
start: T.nilable(Integer),
|
262
|
+
finish: T.nilable(Integer),
|
263
|
+
load: T.nilable(T::Boolean),
|
264
|
+
error_on_ignore: T.nilable(T::Boolean),
|
265
|
+
block: T.nilable(T.proc.params(e: Subject::HABTM_Wizards::ActiveRecord_AssociationRelation).void)
|
266
|
+
).returns(T::Enumerable[Subject::HABTM_Wizards::ActiveRecord_AssociationRelation])
|
267
|
+
end
|
268
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
245
269
|
end
|
246
270
|
|
247
271
|
class Subject::HABTM_Wizards::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -393,6 +393,18 @@ module Wand::QueryMethodsReturningRelation
|
|
393
393
|
|
394
394
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
395
395
|
def extending(*args, &block); end
|
396
|
+
|
397
|
+
sig do
|
398
|
+
params(
|
399
|
+
of: T.nilable(Integer),
|
400
|
+
start: T.nilable(Integer),
|
401
|
+
finish: T.nilable(Integer),
|
402
|
+
load: T.nilable(T::Boolean),
|
403
|
+
error_on_ignore: T.nilable(T::Boolean),
|
404
|
+
block: T.nilable(T.proc.params(e: Wand::ActiveRecord_Relation).void)
|
405
|
+
).returns(T::Enumerable[Wand::ActiveRecord_Relation])
|
406
|
+
end
|
407
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
396
408
|
end
|
397
409
|
|
398
410
|
module Wand::QueryMethodsReturningAssociationRelation
|
@@ -482,4 +494,16 @@ module Wand::QueryMethodsReturningAssociationRelation
|
|
482
494
|
|
483
495
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
484
496
|
def extending(*args, &block); end
|
497
|
+
|
498
|
+
sig do
|
499
|
+
params(
|
500
|
+
of: T.nilable(Integer),
|
501
|
+
start: T.nilable(Integer),
|
502
|
+
finish: T.nilable(Integer),
|
503
|
+
load: T.nilable(T::Boolean),
|
504
|
+
error_on_ignore: T.nilable(T::Boolean),
|
505
|
+
block: T.nilable(T.proc.params(e: Wand::ActiveRecord_AssociationRelation).void)
|
506
|
+
).returns(T::Enumerable[Wand::ActiveRecord_AssociationRelation])
|
507
|
+
end
|
508
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
485
509
|
end
|
@@ -789,6 +789,18 @@ module Wizard::QueryMethodsReturningRelation
|
|
789
789
|
|
790
790
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
791
791
|
def extending(*args, &block); end
|
792
|
+
|
793
|
+
sig do
|
794
|
+
params(
|
795
|
+
of: T.nilable(Integer),
|
796
|
+
start: T.nilable(Integer),
|
797
|
+
finish: T.nilable(Integer),
|
798
|
+
load: T.nilable(T::Boolean),
|
799
|
+
error_on_ignore: T.nilable(T::Boolean),
|
800
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
|
801
|
+
).returns(T::Enumerable[Wizard::ActiveRecord_Relation])
|
802
|
+
end
|
803
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
792
804
|
end
|
793
805
|
|
794
806
|
module Wizard::QueryMethodsReturningAssociationRelation
|
@@ -878,4 +890,16 @@ module Wizard::QueryMethodsReturningAssociationRelation
|
|
878
890
|
|
879
891
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
|
880
892
|
def extending(*args, &block); end
|
893
|
+
|
894
|
+
sig do
|
895
|
+
params(
|
896
|
+
of: T.nilable(Integer),
|
897
|
+
start: T.nilable(Integer),
|
898
|
+
finish: T.nilable(Integer),
|
899
|
+
load: T.nilable(T::Boolean),
|
900
|
+
error_on_ignore: T.nilable(T::Boolean),
|
901
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
|
902
|
+
).returns(T::Enumerable[Wizard::ActiveRecord_AssociationRelation])
|
903
|
+
end
|
904
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
881
905
|
end
|
@@ -153,6 +153,18 @@ module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
|
|
153
153
|
|
154
154
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
|
155
155
|
def extending(*args, &block); end
|
156
|
+
|
157
|
+
sig do
|
158
|
+
params(
|
159
|
+
of: T.nilable(Integer),
|
160
|
+
start: T.nilable(Integer),
|
161
|
+
finish: T.nilable(Integer),
|
162
|
+
load: T.nilable(T::Boolean),
|
163
|
+
error_on_ignore: T.nilable(T::Boolean),
|
164
|
+
block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_Relation).void)
|
165
|
+
).returns(T::Enumerable[Wizard::HABTM_Subjects::ActiveRecord_Relation])
|
166
|
+
end
|
167
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
156
168
|
end
|
157
169
|
|
158
170
|
module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
@@ -242,6 +254,18 @@ module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
|
|
242
254
|
|
243
255
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
|
244
256
|
def extending(*args, &block); end
|
257
|
+
|
258
|
+
sig do
|
259
|
+
params(
|
260
|
+
of: T.nilable(Integer),
|
261
|
+
start: T.nilable(Integer),
|
262
|
+
finish: T.nilable(Integer),
|
263
|
+
load: T.nilable(T::Boolean),
|
264
|
+
error_on_ignore: T.nilable(T::Boolean),
|
265
|
+
block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation).void)
|
266
|
+
).returns(T::Enumerable[Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation])
|
267
|
+
end
|
268
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
245
269
|
end
|
246
270
|
|
247
271
|
class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -783,6 +783,18 @@ module Wizard::QueryMethodsReturningRelation
|
|
783
783
|
|
784
784
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
|
785
785
|
def extending(*args, &block); end
|
786
|
+
|
787
|
+
sig do
|
788
|
+
params(
|
789
|
+
of: T.nilable(Integer),
|
790
|
+
start: T.nilable(Integer),
|
791
|
+
finish: T.nilable(Integer),
|
792
|
+
load: T.nilable(T::Boolean),
|
793
|
+
error_on_ignore: T.nilable(T::Boolean),
|
794
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
|
795
|
+
).returns(T::Enumerable[Wizard::ActiveRecord_Relation])
|
796
|
+
end
|
797
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
786
798
|
end
|
787
799
|
|
788
800
|
module Wizard::QueryMethodsReturningAssociationRelation
|
@@ -872,4 +884,16 @@ module Wizard::QueryMethodsReturningAssociationRelation
|
|
872
884
|
|
873
885
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
|
874
886
|
def extending(*args, &block); end
|
887
|
+
|
888
|
+
sig do
|
889
|
+
params(
|
890
|
+
of: T.nilable(Integer),
|
891
|
+
start: T.nilable(Integer),
|
892
|
+
finish: T.nilable(Integer),
|
893
|
+
load: T.nilable(T::Boolean),
|
894
|
+
error_on_ignore: T.nilable(T::Boolean),
|
895
|
+
block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
|
896
|
+
).returns(T::Enumerable[Wizard::ActiveRecord_AssociationRelation])
|
897
|
+
end
|
898
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
875
899
|
end
|
@@ -75,7 +75,7 @@ class ActiveRecord::Base
|
|
75
75
|
def self.first_or_initialize(attributes = nil, &block); end
|
76
76
|
|
77
77
|
sig do
|
78
|
-
|
78
|
+
params(
|
79
79
|
start: T.nilable(Integer),
|
80
80
|
finish: T.nilable(Integer),
|
81
81
|
batch_size: T.nilable(Integer),
|
@@ -86,7 +86,7 @@ class ActiveRecord::Base
|
|
86
86
|
def self.find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
87
87
|
|
88
88
|
sig do
|
89
|
-
|
89
|
+
params(
|
90
90
|
start: T.nilable(Integer),
|
91
91
|
finish: T.nilable(Integer),
|
92
92
|
batch_size: T.nilable(Integer),
|
@@ -81,7 +81,7 @@ class ActiveRecord::Relation
|
|
81
81
|
def first_or_initialize(attributes = nil, &block); end
|
82
82
|
|
83
83
|
sig do
|
84
|
-
|
84
|
+
params(
|
85
85
|
start: T.nilable(Integer),
|
86
86
|
finish: T.nilable(Integer),
|
87
87
|
batch_size: T.nilable(Integer),
|
@@ -92,7 +92,7 @@ class ActiveRecord::Relation
|
|
92
92
|
def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
93
93
|
|
94
94
|
sig do
|
95
|
-
|
95
|
+
params(
|
96
96
|
start: T.nilable(Integer),
|
97
97
|
finish: T.nilable(Integer),
|
98
98
|
batch_size: T.nilable(Integer),
|
@@ -136,17 +136,17 @@ end
|
|
136
136
|
class ActiveRecord::AssociationRelation < ActiveRecord::Relation
|
137
137
|
Elem = type_member(fixed: T.untyped)
|
138
138
|
|
139
|
-
sig { params(
|
140
|
-
def new(
|
139
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
140
|
+
def new(attributes = nil, &block); end
|
141
141
|
|
142
|
-
sig { params(
|
143
|
-
def build(
|
142
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
143
|
+
def build(attributes = nil, &block); end
|
144
144
|
|
145
|
-
sig { params(
|
146
|
-
def create(
|
145
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
146
|
+
def create(attributes = nil, &block); end
|
147
147
|
|
148
|
-
sig { params(
|
149
|
-
def create!(
|
148
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
149
|
+
def create!(attributes = nil, &block); end
|
150
150
|
end
|
151
151
|
|
152
152
|
class ActiveRecord::Associations::CollectionProxy < ActiveRecord::Relation
|
@@ -144,6 +144,18 @@ module ActiveStorage::Attachment::QueryMethodsReturningRelation
|
|
144
144
|
|
145
145
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
146
146
|
def extending(*args, &block); end
|
147
|
+
|
148
|
+
sig do
|
149
|
+
params(
|
150
|
+
of: T.nilable(Integer),
|
151
|
+
start: T.nilable(Integer),
|
152
|
+
finish: T.nilable(Integer),
|
153
|
+
load: T.nilable(T::Boolean),
|
154
|
+
error_on_ignore: T.nilable(T::Boolean),
|
155
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Attachment::ActiveRecord_Relation).void)
|
156
|
+
).returns(T::Enumerable[ActiveStorage::Attachment::ActiveRecord_Relation])
|
157
|
+
end
|
158
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
147
159
|
end
|
148
160
|
|
149
161
|
module ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
@@ -245,6 +257,18 @@ module ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
|
245
257
|
|
246
258
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
247
259
|
def extending(*args, &block); end
|
260
|
+
|
261
|
+
sig do
|
262
|
+
params(
|
263
|
+
of: T.nilable(Integer),
|
264
|
+
start: T.nilable(Integer),
|
265
|
+
finish: T.nilable(Integer),
|
266
|
+
load: T.nilable(T::Boolean),
|
267
|
+
error_on_ignore: T.nilable(T::Boolean),
|
268
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Attachment::ActiveRecord_AssociationRelation).void)
|
269
|
+
).returns(T::Enumerable[ActiveStorage::Attachment::ActiveRecord_AssociationRelation])
|
270
|
+
end
|
271
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
248
272
|
end
|
249
273
|
|
250
274
|
class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
|
@@ -29,15 +29,65 @@ class ActiveStorage::Blob < ActiveRecord::Base
|
|
29
29
|
extend ActiveStorage::Blob::CustomFinderMethods
|
30
30
|
extend ActiveStorage::Blob::QueryMethodsReturningRelation
|
31
31
|
RelationType = T.type_alias { T.any(ActiveStorage::Blob::ActiveRecord_Relation, ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy, ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
32
|
+
|
33
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
34
|
+
def self.unattached(*args); end
|
35
|
+
|
36
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
37
|
+
def self.with_attached_preview_image(*args); end
|
32
38
|
end
|
33
39
|
|
34
|
-
|
40
|
+
class ActiveStorage::Blob::ActiveRecord_Relation < ActiveRecord::Relation
|
41
|
+
include ActiveStorage::Blob::ActiveRelation_WhereNot
|
42
|
+
include ActiveStorage::Blob::CustomFinderMethods
|
43
|
+
include ActiveStorage::Blob::QueryMethodsReturningRelation
|
44
|
+
Elem = type_member(fixed: ActiveStorage::Blob)
|
45
|
+
|
35
46
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
36
47
|
def unattached(*args); end
|
37
48
|
|
38
49
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
39
50
|
def with_attached_preview_image(*args); end
|
51
|
+
end
|
52
|
+
|
53
|
+
class ActiveStorage::Blob::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
54
|
+
include ActiveStorage::Blob::ActiveRelation_WhereNot
|
55
|
+
include ActiveStorage::Blob::CustomFinderMethods
|
56
|
+
include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
57
|
+
Elem = type_member(fixed: ActiveStorage::Blob)
|
58
|
+
|
59
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
60
|
+
def unattached(*args); end
|
61
|
+
|
62
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
63
|
+
def with_attached_preview_image(*args); end
|
64
|
+
end
|
65
|
+
|
66
|
+
class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
67
|
+
include ActiveStorage::Blob::CustomFinderMethods
|
68
|
+
include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
69
|
+
Elem = type_member(fixed: ActiveStorage::Blob)
|
70
|
+
|
71
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
72
|
+
def unattached(*args); end
|
73
|
+
|
74
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
75
|
+
def with_attached_preview_image(*args); end
|
76
|
+
|
77
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
78
|
+
def <<(*records); end
|
79
|
+
|
80
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
81
|
+
def append(*records); end
|
82
|
+
|
83
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
84
|
+
def push(*records); end
|
85
|
+
|
86
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
87
|
+
def concat(*records); end
|
88
|
+
end
|
40
89
|
|
90
|
+
module ActiveStorage::Blob::QueryMethodsReturningRelation
|
41
91
|
sig { returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
42
92
|
def all; end
|
43
93
|
|
@@ -136,15 +186,21 @@ module ActiveStorage::Blob::QueryMethodsReturningRelation
|
|
136
186
|
|
137
187
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
138
188
|
def extending(*args, &block); end
|
189
|
+
|
190
|
+
sig do
|
191
|
+
params(
|
192
|
+
of: T.nilable(Integer),
|
193
|
+
start: T.nilable(Integer),
|
194
|
+
finish: T.nilable(Integer),
|
195
|
+
load: T.nilable(T::Boolean),
|
196
|
+
error_on_ignore: T.nilable(T::Boolean),
|
197
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Blob::ActiveRecord_Relation).void)
|
198
|
+
).returns(T::Enumerable[ActiveStorage::Blob::ActiveRecord_Relation])
|
199
|
+
end
|
200
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
139
201
|
end
|
140
202
|
|
141
203
|
module ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
142
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
143
|
-
def unattached(*args); end
|
144
|
-
|
145
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
146
|
-
def with_attached_preview_image(*args); end
|
147
|
-
|
148
204
|
sig { returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
149
205
|
def all; end
|
150
206
|
|
@@ -243,20 +299,18 @@ module ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
|
243
299
|
|
244
300
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
245
301
|
def extending(*args, &block); end
|
246
|
-
end
|
247
302
|
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
Elem = type_member(fixed: ActiveStorage::Blob)
|
303
|
+
sig do
|
304
|
+
params(
|
305
|
+
of: T.nilable(Integer),
|
306
|
+
start: T.nilable(Integer),
|
307
|
+
finish: T.nilable(Integer),
|
308
|
+
load: T.nilable(T::Boolean),
|
309
|
+
error_on_ignore: T.nilable(T::Boolean),
|
310
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Blob::ActiveRecord_AssociationRelation).void)
|
311
|
+
).returns(T::Enumerable[ActiveStorage::Blob::ActiveRecord_AssociationRelation])
|
312
|
+
end
|
313
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
260
314
|
end
|
261
315
|
|
262
316
|
module ActiveStorage::Blob::GeneratedAssociationMethods
|
@@ -287,21 +341,3 @@ module ActiveStorage::Blob::GeneratedAssociationMethods
|
|
287
341
|
sig { params(attachable: T.untyped).returns(T.untyped) }
|
288
342
|
def preview_image=(attachable); end
|
289
343
|
end
|
290
|
-
|
291
|
-
class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
292
|
-
include ActiveStorage::Blob::CustomFinderMethods
|
293
|
-
include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
294
|
-
Elem = type_member(fixed: ActiveStorage::Blob)
|
295
|
-
|
296
|
-
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
297
|
-
def <<(*records); end
|
298
|
-
|
299
|
-
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
300
|
-
def append(*records); end
|
301
|
-
|
302
|
-
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
303
|
-
def push(*records); end
|
304
|
-
|
305
|
-
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
306
|
-
def concat(*records); end
|
307
|
-
end
|