sorbet-rails 0.6.3 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -2
  3. data/.gitignore +2 -1
  4. data/.travis.yml +3 -1
  5. data/README.md +54 -7
  6. data/Rakefile +3 -3
  7. data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
  8. data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
  9. data/lib/bundled_rbi/typed_enum.rbi +7 -0
  10. data/lib/sorbet-rails.rb +1 -3
  11. data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
  12. data/lib/sorbet-rails/config.rb +11 -0
  13. data/lib/sorbet-rails/deprecation.rb +1 -0
  14. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
  15. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
  16. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
  17. data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
  18. data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
  19. data/lib/sorbet-rails/model_column_utils.rb +129 -0
  20. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +37 -3
  21. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -103
  22. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
  23. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
  24. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
  25. data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
  26. data/lib/sorbet-rails/model_plugins/base.rb +0 -9
  27. data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
  28. data/lib/sorbet-rails/model_utils.rb +73 -32
  29. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  30. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
  31. data/lib/sorbet-rails/railtie.rb +0 -2
  32. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  33. data/lib/sorbet-rails/tasks/rails_rbi.rake +18 -26
  34. data/sorbet-rails.gemspec +1 -1
  35. data/spec/generators/rails-template.rb +3 -6
  36. data/spec/generators/sorbet_test_cases.rb +66 -88
  37. data/spec/job_rbi_formatter_spec.rb +1 -1
  38. data/spec/pluck_to_tstruct_spec.rb +74 -1
  39. data/spec/rails_helper.rb +2 -2
  40. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  41. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  42. data/spec/support/v5.0/Gemfile +1 -1
  43. data/spec/support/v5.0/Gemfile.lock +9 -9
  44. data/spec/support/v5.0/app/models/spell_book.rb +2 -0
  45. data/spec/support/v5.0/app/models/wizard.rb +1 -1
  46. data/spec/support/v5.0/sorbet_test_cases.rb +66 -88
  47. data/spec/support/v5.1/Gemfile.lock +7 -7
  48. data/spec/support/v5.1/app/models/spell_book.rb +2 -0
  49. data/spec/support/v5.1/app/models/wizard.rb +1 -1
  50. data/spec/support/v5.1/sorbet_test_cases.rb +66 -88
  51. data/spec/support/v5.2/Gemfile +1 -1
  52. data/spec/support/v5.2/Gemfile.lock +9 -9
  53. data/spec/support/v5.2/app/models/spell_book.rb +2 -0
  54. data/spec/support/v5.2/app/models/wizard.rb +1 -1
  55. data/spec/support/v5.2/sorbet_test_cases.rb +66 -88
  56. data/spec/support/v6.0/.gitignore +6 -0
  57. data/spec/support/v6.0/Gemfile +3 -3
  58. data/spec/support/v6.0/Gemfile.lock +77 -76
  59. data/spec/support/v6.0/app/models/spell_book.rb +2 -0
  60. data/spec/support/v6.0/app/models/wizard.rb +1 -1
  61. data/spec/support/v6.0/bin/bundle +22 -13
  62. data/spec/support/v6.0/config/environments/test.rb +1 -1
  63. data/spec/support/v6.0/sorbet_test_cases.rb +66 -88
  64. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  65. data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
  66. data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
  67. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  68. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  69. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  70. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  71. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  72. data/spec/test_data/v5.0/expected_headmaster.rbi +60 -190
  73. data/spec/test_data/v5.0/expected_internal_metadata.rbi +42 -188
  74. data/spec/test_data/v5.0/expected_potion.rbi +51 -188
  75. data/spec/test_data/v5.0/expected_robe.rbi +51 -190
  76. data/spec/test_data/v5.0/expected_schema_migration.rbi +42 -188
  77. data/spec/test_data/v5.0/expected_school.rbi +51 -190
  78. data/spec/test_data/v5.0/expected_spell.rbi +42 -190
  79. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +60 -190
  80. data/spec/test_data/v5.0/expected_spell_book.rbi +86 -215
  81. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +60 -190
  82. data/spec/test_data/v5.0/expected_squib.rbi +131 -263
  83. data/spec/test_data/v5.0/expected_subject.rbi +42 -190
  84. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +60 -190
  85. data/spec/test_data/v5.0/expected_wand.rbi +84 -225
  86. data/spec/test_data/v5.0/expected_wizard.rbi +131 -263
  87. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +60 -190
  88. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +131 -263
  89. data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
  90. data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
  91. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  92. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  93. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  94. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  95. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  96. data/spec/test_data/v5.1/expected_headmaster.rbi +60 -196
  97. data/spec/test_data/v5.1/expected_internal_metadata.rbi +42 -194
  98. data/spec/test_data/v5.1/expected_potion.rbi +51 -194
  99. data/spec/test_data/v5.1/expected_robe.rbi +51 -196
  100. data/spec/test_data/v5.1/expected_schema_migration.rbi +42 -194
  101. data/spec/test_data/v5.1/expected_school.rbi +51 -196
  102. data/spec/test_data/v5.1/expected_spell.rbi +42 -196
  103. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +60 -196
  104. data/spec/test_data/v5.1/expected_spell_book.rbi +86 -221
  105. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +60 -196
  106. data/spec/test_data/v5.1/expected_squib.rbi +132 -270
  107. data/spec/test_data/v5.1/expected_subject.rbi +42 -196
  108. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +60 -196
  109. data/spec/test_data/v5.1/expected_wand.rbi +84 -231
  110. data/spec/test_data/v5.1/expected_wizard.rbi +132 -270
  111. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +60 -196
  112. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +132 -270
  113. data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
  114. data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
  115. data/spec/test_data/v5.2/expected_attachment.rbi +60 -194
  116. data/spec/test_data/v5.2/expected_blob.rbi +80 -214
  117. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  118. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  119. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  120. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  121. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  122. data/spec/test_data/v5.2/expected_headmaster.rbi +60 -196
  123. data/spec/test_data/v5.2/expected_internal_metadata.rbi +42 -194
  124. data/spec/test_data/v5.2/expected_potion.rbi +51 -194
  125. data/spec/test_data/v5.2/expected_robe.rbi +51 -196
  126. data/spec/test_data/v5.2/expected_schema_migration.rbi +42 -194
  127. data/spec/test_data/v5.2/expected_school.rbi +51 -196
  128. data/spec/test_data/v5.2/expected_spell.rbi +42 -196
  129. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +60 -196
  130. data/spec/test_data/v5.2/expected_spell_book.rbi +86 -221
  131. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +60 -196
  132. data/spec/test_data/v5.2/expected_squib.rbi +156 -276
  133. data/spec/test_data/v5.2/expected_subject.rbi +42 -196
  134. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +60 -196
  135. data/spec/test_data/v5.2/expected_wand.rbi +84 -231
  136. data/spec/test_data/v5.2/expected_wizard.rbi +156 -276
  137. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +60 -196
  138. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +156 -276
  139. data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
  140. data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
  141. data/spec/test_data/v6.0/expected_attachment.rbi +60 -218
  142. data/spec/test_data/v6.0/expected_blob.rbi +80 -238
  143. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  144. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  145. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  146. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  147. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  148. data/spec/test_data/v6.0/expected_headmaster.rbi +60 -220
  149. data/spec/test_data/v6.0/expected_internal_metadata.rbi +42 -218
  150. data/spec/test_data/v6.0/expected_potion.rbi +51 -218
  151. data/spec/test_data/v6.0/expected_robe.rbi +51 -220
  152. data/spec/test_data/v6.0/expected_routes.rbi +14 -7
  153. data/spec/test_data/v6.0/expected_schema_migration.rbi +42 -218
  154. data/spec/test_data/v6.0/expected_school.rbi +51 -220
  155. data/spec/test_data/v6.0/expected_spell.rbi +42 -220
  156. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +60 -220
  157. data/spec/test_data/v6.0/expected_spell_book.rbi +98 -257
  158. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +60 -220
  159. data/spec/test_data/v6.0/expected_squib.rbi +182 -326
  160. data/spec/test_data/v6.0/expected_subject.rbi +42 -220
  161. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +60 -220
  162. data/spec/test_data/v6.0/expected_wand.rbi +100 -271
  163. data/spec/test_data/v6.0/expected_wizard.rbi +182 -326
  164. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +60 -220
  165. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +182 -326
  166. metadata +46 -11
  167. data/lib/bundled_rbi/parameters.rbi +0 -28
  168. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
  169. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
  170. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
  171. data/spec/boolean_string_spec.rb +0 -59
  172. data/spec/custom_params_methods_spec.rb +0 -138
  173. data/spec/integer_string_spec.rb +0 -46
@@ -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
- override.params(
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
- override.params(
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
- override.params(
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
- override.params(
95
+ params(
96
96
  start: T.nilable(Integer),
97
97
  finish: T.nilable(Integer),
98
98
  batch_size: T.nilable(Integer),
@@ -8,17 +8,33 @@ module ActiveStorage::Attachment::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module ActiveStorage::Attachment::GeneratedAssociationMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(::ActiveStorage::Blob) }
14
12
  def blob; end
15
13
 
14
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
15
+ def build_blob(*args, &block); end
16
+
17
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
18
+ def create_blob(*args, &block); end
19
+
20
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
21
+ def create_blob!(*args, &block); end
22
+
16
23
  sig { params(value: ::ActiveStorage::Blob).void }
17
24
  def blob=(value); end
18
25
 
19
26
  sig { returns(T.untyped) }
20
27
  def record; end
21
28
 
29
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
30
+ def build_record(*args, &block); end
31
+
32
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
33
+ def create_record(*args, &block); end
34
+
35
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
36
+ def create_record!(*args, &block); end
37
+
22
38
  sig { params(value: T.untyped).void }
23
39
  def record=(value); end
24
40
  end
@@ -43,105 +59,11 @@ end
43
59
  class ActiveStorage::Attachment < ActiveRecord::Base
44
60
  include ActiveStorage::Attachment::GeneratedAssociationMethods
45
61
  extend ActiveStorage::Attachment::CustomFinderMethods
46
- extend T::Sig
47
- extend T::Generic
62
+ extend ActiveStorage::Attachment::QueryMethodsReturningRelation
48
63
  RelationType = T.type_alias { T.any(ActiveStorage::Attachment::ActiveRecord_Relation, ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy, ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
49
-
50
- sig { returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
51
- def self.all; end
52
-
53
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
54
- def self.unscoped(&block); end
55
-
56
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
57
- def self.select(*args); end
58
-
59
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
60
- def self.order(*args); end
61
-
62
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
63
- def self.reorder(*args); end
64
-
65
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
66
- def self.group(*args); end
67
-
68
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
69
- def self.limit(*args); end
70
-
71
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
72
- def self.offset(*args); end
73
-
74
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
75
- def self.joins(*args); end
76
-
77
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
78
- def self.left_joins(*args); end
79
-
80
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
81
- def self.left_outer_joins(*args); end
82
-
83
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
84
- def self.where(*args); end
85
-
86
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
87
- def self.rewhere(*args); end
88
-
89
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
90
- def self.preload(*args); end
91
-
92
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
93
- def self.eager_load(*args); end
94
-
95
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
96
- def self.includes(*args); end
97
-
98
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
99
- def self.from(*args); end
100
-
101
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
102
- def self.lock(*args); end
103
-
104
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
105
- def self.readonly(*args); end
106
-
107
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
108
- def self.or(*args); end
109
-
110
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
111
- def self.having(*args); end
112
-
113
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
114
- def self.create_with(*args); end
115
-
116
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
117
- def self.distinct(*args); end
118
-
119
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
120
- def self.references(*args); end
121
-
122
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
123
- def self.none(*args); end
124
-
125
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
126
- def self.unscope(*args); end
127
-
128
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
129
- def self.merge(*args); end
130
-
131
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
132
- def self.except(*args); end
133
-
134
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
135
- def self.extending(*args, &block); end
136
64
  end
137
65
 
138
- class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
139
- include ActiveStorage::Attachment::ActiveRelation_WhereNot
140
- include ActiveStorage::Attachment::CustomFinderMethods
141
- extend T::Sig
142
- extend T::Generic
143
- Elem = type_member(fixed: ActiveStorage::Attachment)
144
-
66
+ module ActiveStorage::Attachment::QueryMethodsReturningRelation
145
67
  sig { returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
146
68
  def all; end
147
69
 
@@ -228,19 +150,25 @@ class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
228
150
 
229
151
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
230
152
  def extending(*args, &block); end
231
- end
232
153
 
233
- class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
234
- include ActiveStorage::Attachment::ActiveRelation_WhereNot
235
- include ActiveStorage::Attachment::CustomFinderMethods
236
- extend T::Sig
237
- extend T::Generic
238
- Elem = type_member(fixed: ActiveStorage::Attachment)
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: ActiveStorage::Attachment::ActiveRecord_Relation).void)
162
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
163
+ end
164
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
165
+ end
239
166
 
167
+ module ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
240
168
  sig { returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
241
169
  def all; end
242
170
 
243
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
171
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
244
172
  def unscoped(&block); end
245
173
 
246
174
  sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
@@ -323,100 +251,38 @@ class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord
323
251
 
324
252
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
325
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: ActiveStorage::Attachment::ActiveRecord_AssociationRelation).void)
263
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
264
+ end
265
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
326
266
  end
327
267
 
328
- class ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
268
+ class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
269
+ include ActiveStorage::Attachment::ActiveRelation_WhereNot
329
270
  include ActiveStorage::Attachment::CustomFinderMethods
330
- extend T::Sig
331
- extend T::Generic
271
+ include ActiveStorage::Attachment::QueryMethodsReturningRelation
332
272
  Elem = type_member(fixed: ActiveStorage::Attachment)
273
+ end
333
274
 
334
- sig { returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
335
- def all; end
336
-
337
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
338
- def unscoped(&block); end
339
-
340
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
341
- def select(*args); end
342
-
343
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
344
- def order(*args); end
345
-
346
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
347
- def reorder(*args); end
348
-
349
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
350
- def group(*args); end
351
-
352
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
353
- def limit(*args); end
354
-
355
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
356
- def offset(*args); end
357
-
358
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
359
- def joins(*args); end
360
-
361
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
362
- def left_joins(*args); end
363
-
364
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
365
- def left_outer_joins(*args); end
366
-
367
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
368
- def where(*args); end
369
-
370
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
371
- def rewhere(*args); end
372
-
373
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
374
- def preload(*args); end
375
-
376
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
377
- def eager_load(*args); end
378
-
379
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
380
- def includes(*args); end
381
-
382
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
383
- def from(*args); end
384
-
385
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
386
- def lock(*args); end
387
-
388
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
389
- def readonly(*args); end
390
-
391
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
392
- def or(*args); end
393
-
394
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
395
- def having(*args); end
396
-
397
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
398
- def create_with(*args); end
399
-
400
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
401
- def distinct(*args); end
402
-
403
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
404
- def references(*args); end
405
-
406
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
407
- def none(*args); end
408
-
409
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
410
- def unscope(*args); end
411
-
412
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
413
- def merge(*args); end
414
-
415
- sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
416
- def except(*args); end
275
+ class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
276
+ include ActiveStorage::Attachment::ActiveRelation_WhereNot
277
+ include ActiveStorage::Attachment::CustomFinderMethods
278
+ include ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
279
+ Elem = type_member(fixed: ActiveStorage::Attachment)
280
+ end
417
281
 
418
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
419
- def extending(*args, &block); end
282
+ class ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
283
+ include ActiveStorage::Attachment::CustomFinderMethods
284
+ include ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
285
+ Elem = type_member(fixed: ActiveStorage::Attachment)
420
286
 
421
287
  sig { params(records: T.any(ActiveStorage::Attachment, T::Array[ActiveStorage::Attachment])).returns(T.self_type) }
422
288
  def <<(*records); end
@@ -8,12 +8,10 @@ module ActiveStorage::Blob::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module ActiveStorage::Blob::GeneratedAssociationMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
14
12
  def attachments; end
15
13
 
16
- sig { returns(T::Array[Integer]) }
14
+ sig { returns(T::Array[T.untyped]) }
17
15
  def attachment_ids; end
18
16
 
19
17
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
@@ -22,12 +20,30 @@ module ActiveStorage::Blob::GeneratedAssociationMethods
22
20
  sig { returns(T.nilable(::ActiveStorage::Attachment)) }
23
21
  def preview_image_attachment; end
24
22
 
23
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
24
+ def build_preview_image_attachment(*args, &block); end
25
+
26
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
27
+ def create_preview_image_attachment(*args, &block); end
28
+
29
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
30
+ def create_preview_image_attachment!(*args, &block); end
31
+
25
32
  sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
26
33
  def preview_image_attachment=(value); end
27
34
 
28
35
  sig { returns(T.nilable(::ActiveStorage::Blob)) }
29
36
  def preview_image_blob; end
30
37
 
38
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
39
+ def build_preview_image_blob(*args, &block); end
40
+
41
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
42
+ def create_preview_image_blob(*args, &block); end
43
+
44
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
45
+ def create_preview_image_blob!(*args, &block); end
46
+
31
47
  sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
32
48
  def preview_image_blob=(value); end
33
49
  end
@@ -52,8 +68,7 @@ end
52
68
  class ActiveStorage::Blob < ActiveRecord::Base
53
69
  include ActiveStorage::Blob::GeneratedAssociationMethods
54
70
  extend ActiveStorage::Blob::CustomFinderMethods
55
- extend T::Sig
56
- extend T::Generic
71
+ extend ActiveStorage::Blob::QueryMethodsReturningRelation
57
72
  RelationType = T.type_alias { T.any(ActiveStorage::Blob::ActiveRecord_Relation, ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy, ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
58
73
 
59
74
  sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
@@ -61,108 +76,59 @@ class ActiveStorage::Blob < ActiveRecord::Base
61
76
 
62
77
  sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
63
78
  def self.with_attached_preview_image(*args); end
79
+ end
64
80
 
65
- sig { returns(ActiveStorage::Blob::ActiveRecord_Relation) }
66
- def self.all; end
67
-
68
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
69
- def self.unscoped(&block); end
70
-
71
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
72
- def self.select(*args); end
73
-
74
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
75
- def self.order(*args); end
76
-
77
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
78
- def self.reorder(*args); end
79
-
80
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
81
- def self.group(*args); end
82
-
83
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
84
- def self.limit(*args); end
85
-
86
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
87
- def self.offset(*args); end
88
-
89
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
90
- def self.joins(*args); end
91
-
92
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
93
- def self.left_joins(*args); end
94
-
95
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
96
- def self.left_outer_joins(*args); end
97
-
98
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
99
- def self.where(*args); end
100
-
101
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
102
- def self.rewhere(*args); end
103
-
104
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
105
- def self.preload(*args); end
106
-
107
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
108
- def self.eager_load(*args); end
109
-
110
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
111
- def self.includes(*args); end
112
-
113
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
114
- def self.from(*args); end
115
-
116
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
117
- def self.lock(*args); end
118
-
119
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
120
- def self.readonly(*args); end
121
-
122
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
123
- def self.or(*args); end
124
-
125
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
126
- def self.having(*args); end
127
-
128
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
129
- def self.create_with(*args); end
130
-
131
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
132
- def self.distinct(*args); end
133
-
134
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
135
- def self.references(*args); end
81
+ class ActiveStorage::Blob::ActiveRecord_Relation < ActiveRecord::Relation
82
+ include ActiveStorage::Blob::ActiveRelation_WhereNot
83
+ include ActiveStorage::Blob::CustomFinderMethods
84
+ include ActiveStorage::Blob::QueryMethodsReturningRelation
85
+ Elem = type_member(fixed: ActiveStorage::Blob)
136
86
 
137
87
  sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
138
- def self.none(*args); end
88
+ def unattached(*args); end
139
89
 
140
90
  sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
141
- def self.unscope(*args); end
91
+ def with_attached_preview_image(*args); end
92
+ end
142
93
 
143
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
144
- def self.merge(*args); end
94
+ class ActiveStorage::Blob::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
95
+ include ActiveStorage::Blob::ActiveRelation_WhereNot
96
+ include ActiveStorage::Blob::CustomFinderMethods
97
+ include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
98
+ Elem = type_member(fixed: ActiveStorage::Blob)
145
99
 
146
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
147
- def self.except(*args); end
100
+ sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
101
+ def unattached(*args); end
148
102
 
149
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
150
- def self.extending(*args, &block); end
103
+ sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
104
+ def with_attached_preview_image(*args); end
151
105
  end
152
106
 
153
- class ActiveStorage::Blob::ActiveRecord_Relation < ActiveRecord::Relation
154
- include ActiveStorage::Blob::ActiveRelation_WhereNot
107
+ class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
155
108
  include ActiveStorage::Blob::CustomFinderMethods
156
- extend T::Sig
157
- extend T::Generic
109
+ include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
158
110
  Elem = type_member(fixed: ActiveStorage::Blob)
159
111
 
160
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
112
+ sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
161
113
  def unattached(*args); end
162
114
 
163
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
115
+ sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
164
116
  def with_attached_preview_image(*args); end
165
117
 
118
+ sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
119
+ def <<(*records); end
120
+
121
+ sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
122
+ def append(*records); end
123
+
124
+ sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
125
+ def push(*records); end
126
+
127
+ sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
128
+ def concat(*records); end
129
+ end
130
+
131
+ module ActiveStorage::Blob::QueryMethodsReturningRelation
166
132
  sig { returns(ActiveStorage::Blob::ActiveRecord_Relation) }
167
133
  def all; end
168
134
 
@@ -249,125 +215,25 @@ class ActiveStorage::Blob::ActiveRecord_Relation < ActiveRecord::Relation
249
215
 
250
216
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
251
217
  def extending(*args, &block); end
252
- end
253
-
254
- class ActiveStorage::Blob::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
255
- include ActiveStorage::Blob::ActiveRelation_WhereNot
256
- include ActiveStorage::Blob::CustomFinderMethods
257
- extend T::Sig
258
- extend T::Generic
259
- Elem = type_member(fixed: ActiveStorage::Blob)
260
-
261
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
262
- def unattached(*args); end
263
-
264
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
265
- def with_attached_preview_image(*args); end
266
-
267
- sig { returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
268
- def all; end
269
-
270
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
271
- def unscoped(&block); end
272
-
273
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
274
- def select(*args); end
275
-
276
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
277
- def order(*args); end
278
-
279
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
280
- def reorder(*args); end
281
-
282
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
283
- def group(*args); end
284
-
285
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
286
- def limit(*args); end
287
-
288
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
289
- def offset(*args); end
290
-
291
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
292
- def joins(*args); end
293
-
294
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
295
- def left_joins(*args); end
296
-
297
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
298
- def left_outer_joins(*args); end
299
-
300
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
301
- def where(*args); end
302
-
303
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
304
- def rewhere(*args); end
305
-
306
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
307
- def preload(*args); end
308
-
309
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
310
- def eager_load(*args); end
311
-
312
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
313
- def includes(*args); end
314
-
315
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
316
- def from(*args); end
317
-
318
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
319
- def lock(*args); end
320
-
321
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
322
- def readonly(*args); end
323
-
324
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
325
- def or(*args); end
326
-
327
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
328
- def having(*args); end
329
-
330
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
331
- def create_with(*args); end
332
-
333
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
334
- def distinct(*args); end
335
218
 
336
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
337
- def references(*args); end
338
-
339
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
340
- def none(*args); end
341
-
342
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
343
- def unscope(*args); end
344
-
345
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
346
- def merge(*args); end
347
-
348
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
349
- def except(*args); end
350
-
351
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
352
- def extending(*args, &block); end
219
+ sig do
220
+ params(
221
+ of: T.nilable(Integer),
222
+ start: T.nilable(Integer),
223
+ finish: T.nilable(Integer),
224
+ load: T.nilable(T::Boolean),
225
+ error_on_ignore: T.nilable(T::Boolean),
226
+ block: T.nilable(T.proc.params(e: ActiveStorage::Blob::ActiveRecord_Relation).void)
227
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
228
+ end
229
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
353
230
  end
354
231
 
355
- class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
356
- include ActiveStorage::Blob::CustomFinderMethods
357
- extend T::Sig
358
- extend T::Generic
359
- Elem = type_member(fixed: ActiveStorage::Blob)
360
-
361
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
362
- def unattached(*args); end
363
-
364
- sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
365
- def with_attached_preview_image(*args); end
366
-
232
+ module ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
367
233
  sig { returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
368
234
  def all; end
369
235
 
370
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
236
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
371
237
  def unscoped(&block); end
372
238
 
373
239
  sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
@@ -451,15 +317,15 @@ class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRec
451
317
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
452
318
  def extending(*args, &block); end
453
319
 
454
- sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
455
- def <<(*records); end
456
-
457
- sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
458
- def append(*records); end
459
-
460
- sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
461
- def push(*records); end
462
-
463
- sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
464
- def concat(*records); end
320
+ sig do
321
+ params(
322
+ of: T.nilable(Integer),
323
+ start: T.nilable(Integer),
324
+ finish: T.nilable(Integer),
325
+ load: T.nilable(T::Boolean),
326
+ error_on_ignore: T.nilable(T::Boolean),
327
+ block: T.nilable(T.proc.params(e: ActiveStorage::Blob::ActiveRecord_AssociationRelation).void)
328
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
329
+ end
330
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
465
331
  end