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
@@ -8,8 +8,6 @@ module Wizard::HABTM_Subjects::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module Wizard::HABTM_Subjects::GeneratedAttributeMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(T.nilable(Integer)) }
14
12
  def subject_id; end
15
13
 
@@ -30,17 +28,33 @@ module Wizard::HABTM_Subjects::GeneratedAttributeMethods
30
28
  end
31
29
 
32
30
  module Wizard::HABTM_Subjects::GeneratedAssociationMethods
33
- extend T::Sig
34
-
35
31
  sig { returns(T.nilable(::Wizard)) }
36
32
  def left_side; end
37
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
41
+ def create_left_side!(*args, &block); end
42
+
38
43
  sig { params(value: T.nilable(::Wizard)).void }
39
44
  def left_side=(value); end
40
45
 
41
46
  sig { returns(T.nilable(::Subject)) }
42
47
  def subject; end
43
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
50
+ def build_subject(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
53
+ def create_subject(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
56
+ def create_subject!(*args, &block); end
57
+
44
58
  sig { params(value: T.nilable(::Subject)).void }
45
59
  def subject=(value); end
46
60
  end
@@ -66,117 +80,11 @@ class Wizard::HABTM_Subjects < ActiveRecord::Base
66
80
  include Wizard::HABTM_Subjects::GeneratedAttributeMethods
67
81
  include Wizard::HABTM_Subjects::GeneratedAssociationMethods
68
82
  extend Wizard::HABTM_Subjects::CustomFinderMethods
69
- extend T::Sig
70
- extend T::Generic
83
+ extend Wizard::HABTM_Subjects::QueryMethodsReturningRelation
71
84
  RelationType = T.type_alias { T.any(Wizard::HABTM_Subjects::ActiveRecord_Relation, Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy, Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
72
-
73
- sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
74
- def self.all; end
75
-
76
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
77
- def self.unscoped(&block); end
78
-
79
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
80
- def self.select(*args); end
81
-
82
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
83
- def self.reselect(*args); end
84
-
85
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
86
- def self.order(*args); end
87
-
88
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
89
- def self.reorder(*args); end
90
-
91
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
92
- def self.group(*args); end
93
-
94
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
95
- def self.limit(*args); end
96
-
97
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
98
- def self.offset(*args); end
99
-
100
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
101
- def self.joins(*args); end
102
-
103
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
104
- def self.left_joins(*args); end
105
-
106
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
107
- def self.left_outer_joins(*args); end
108
-
109
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
110
- def self.where(*args); end
111
-
112
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
113
- def self.rewhere(*args); end
114
-
115
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
116
- def self.preload(*args); end
117
-
118
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
119
- def self.extract_associated(*args); end
120
-
121
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
122
- def self.eager_load(*args); end
123
-
124
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
125
- def self.includes(*args); end
126
-
127
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
128
- def self.from(*args); end
129
-
130
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
131
- def self.lock(*args); end
132
-
133
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
134
- def self.readonly(*args); end
135
-
136
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
137
- def self.or(*args); end
138
-
139
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
140
- def self.having(*args); end
141
-
142
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
143
- def self.create_with(*args); end
144
-
145
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
146
- def self.distinct(*args); end
147
-
148
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
149
- def self.references(*args); end
150
-
151
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
152
- def self.none(*args); end
153
-
154
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
155
- def self.unscope(*args); end
156
-
157
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
158
- def self.optimizer_hints(*args); end
159
-
160
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
161
- def self.merge(*args); end
162
-
163
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
164
- def self.except(*args); end
165
-
166
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
167
- def self.only(*args); end
168
-
169
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
170
- def self.extending(*args, &block); end
171
85
  end
172
86
 
173
- class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
174
- include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
175
- include Wizard::HABTM_Subjects::CustomFinderMethods
176
- extend T::Sig
177
- extend T::Generic
178
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
179
-
87
+ module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
180
88
  sig { returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
181
89
  def all; end
182
90
 
@@ -275,19 +183,25 @@ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
275
183
 
276
184
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
277
185
  def extending(*args, &block); end
278
- end
279
186
 
280
- class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
281
- include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
282
- include Wizard::HABTM_Subjects::CustomFinderMethods
283
- extend T::Sig
284
- extend T::Generic
285
- Elem = type_member(fixed: Wizard::HABTM_Subjects)
187
+ sig do
188
+ params(
189
+ of: T.nilable(Integer),
190
+ start: T.nilable(Integer),
191
+ finish: T.nilable(Integer),
192
+ load: T.nilable(T::Boolean),
193
+ error_on_ignore: T.nilable(T::Boolean),
194
+ block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_Relation).void)
195
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
196
+ end
197
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
198
+ end
286
199
 
200
+ module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
287
201
  sig { returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
288
202
  def all; end
289
203
 
290
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
204
+ sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
291
205
  def unscoped(&block); end
292
206
 
293
207
  sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
@@ -382,112 +296,38 @@ class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::A
382
296
 
383
297
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
384
298
  def extending(*args, &block); end
299
+
300
+ sig do
301
+ params(
302
+ of: T.nilable(Integer),
303
+ start: T.nilable(Integer),
304
+ finish: T.nilable(Integer),
305
+ load: T.nilable(T::Boolean),
306
+ error_on_ignore: T.nilable(T::Boolean),
307
+ block: T.nilable(T.proc.params(e: Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation).void)
308
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
309
+ end
310
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
385
311
  end
386
312
 
387
- class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
313
+ class Wizard::HABTM_Subjects::ActiveRecord_Relation < ActiveRecord::Relation
314
+ include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
388
315
  include Wizard::HABTM_Subjects::CustomFinderMethods
389
- extend T::Sig
390
- extend T::Generic
316
+ include Wizard::HABTM_Subjects::QueryMethodsReturningRelation
391
317
  Elem = type_member(fixed: Wizard::HABTM_Subjects)
318
+ end
392
319
 
393
- sig { returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
394
- def all; end
395
-
396
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
397
- def unscoped(&block); end
398
-
399
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
400
- def select(*args); end
401
-
402
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
403
- def reselect(*args); end
404
-
405
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
406
- def order(*args); end
407
-
408
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
409
- def reorder(*args); end
410
-
411
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
412
- def group(*args); end
413
-
414
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
415
- def limit(*args); end
416
-
417
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
418
- def offset(*args); end
419
-
420
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
421
- def joins(*args); end
422
-
423
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
424
- def left_joins(*args); end
425
-
426
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
427
- def left_outer_joins(*args); end
428
-
429
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
430
- def where(*args); end
431
-
432
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
433
- def rewhere(*args); end
434
-
435
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
436
- def preload(*args); end
437
-
438
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
439
- def extract_associated(*args); end
440
-
441
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
442
- def eager_load(*args); end
443
-
444
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
445
- def includes(*args); end
446
-
447
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
448
- def from(*args); end
449
-
450
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
451
- def lock(*args); end
452
-
453
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
454
- def readonly(*args); end
455
-
456
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
457
- def or(*args); end
458
-
459
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
460
- def having(*args); end
461
-
462
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
463
- def create_with(*args); end
464
-
465
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
466
- def distinct(*args); end
467
-
468
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
469
- def references(*args); end
470
-
471
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
472
- def none(*args); end
473
-
474
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
475
- def unscope(*args); end
476
-
477
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
478
- def optimizer_hints(*args); end
479
-
480
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
481
- def merge(*args); end
482
-
483
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
484
- def except(*args); end
485
-
486
- sig { params(args: T.untyped).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
487
- def only(*args); end
320
+ class Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
321
+ include Wizard::HABTM_Subjects::ActiveRelation_WhereNot
322
+ include Wizard::HABTM_Subjects::CustomFinderMethods
323
+ include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
324
+ Elem = type_member(fixed: Wizard::HABTM_Subjects)
325
+ end
488
326
 
489
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
490
- def extending(*args, &block); end
327
+ class Wizard::HABTM_Subjects::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
328
+ include Wizard::HABTM_Subjects::CustomFinderMethods
329
+ include Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
330
+ Elem = type_member(fixed: Wizard::HABTM_Subjects)
491
331
 
492
332
  sig { params(records: T.any(Wizard::HABTM_Subjects, T::Array[Wizard::HABTM_Subjects])).returns(T.self_type) }
493
333
  def <<(*records); end
@@ -3,8 +3,6 @@
3
3
 
4
4
  # typed: strong
5
5
  module Wizard::EnumInstanceMethods
6
- extend T::Sig
7
-
8
6
  sig { returns(T::Boolean) }
9
7
  def broom_nimbus?; end
10
8
 
@@ -114,8 +112,6 @@ module Wizard::ActiveRelation_WhereNot
114
112
  end
115
113
 
116
114
  module Wizard::GeneratedAttributeMethods
117
- extend T::Sig
118
-
119
115
  sig { returns(T::Boolean) }
120
116
  def broom?; end
121
117
 
@@ -314,8 +310,7 @@ class Wizard < ApplicationRecord
314
310
  include Wizard::GeneratedAttributeMethods
315
311
  include Wizard::GeneratedAssociationMethods
316
312
  extend Wizard::CustomFinderMethods
317
- extend T::Sig
318
- extend T::Generic
313
+ extend Wizard::QueryMethodsReturningRelation
319
314
  RelationType = T.type_alias { T.any(Wizard::ActiveRecord_Relation, Wizard::ActiveRecord_Associations_CollectionProxy, Wizard::ActiveRecord_AssociationRelation) }
320
315
 
321
316
  sig { returns(T::Hash[T.any(String, Symbol), String]) }
@@ -447,105 +442,6 @@ class Wizard < ApplicationRecord
447
442
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
448
443
  def self.with_attached_school_photo(*args); end
449
444
 
450
- sig { returns(Wizard::ActiveRecord_Relation) }
451
- def self.all; end
452
-
453
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
454
- def self.unscoped(&block); end
455
-
456
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
457
- def self.select(*args); end
458
-
459
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
460
- def self.reselect(*args); end
461
-
462
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
463
- def self.order(*args); end
464
-
465
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
466
- def self.reorder(*args); end
467
-
468
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
469
- def self.group(*args); end
470
-
471
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
472
- def self.limit(*args); end
473
-
474
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
475
- def self.offset(*args); end
476
-
477
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
478
- def self.joins(*args); end
479
-
480
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
481
- def self.left_joins(*args); end
482
-
483
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
484
- def self.left_outer_joins(*args); end
485
-
486
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
487
- def self.where(*args); end
488
-
489
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
490
- def self.rewhere(*args); end
491
-
492
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
493
- def self.preload(*args); end
494
-
495
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
496
- def self.extract_associated(*args); end
497
-
498
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
499
- def self.eager_load(*args); end
500
-
501
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
502
- def self.includes(*args); end
503
-
504
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
505
- def self.from(*args); end
506
-
507
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
508
- def self.lock(*args); end
509
-
510
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
511
- def self.readonly(*args); end
512
-
513
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
514
- def self.or(*args); end
515
-
516
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
517
- def self.having(*args); end
518
-
519
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
520
- def self.create_with(*args); end
521
-
522
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
523
- def self.distinct(*args); end
524
-
525
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
526
- def self.references(*args); end
527
-
528
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
529
- def self.none(*args); end
530
-
531
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
532
- def self.unscope(*args); end
533
-
534
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
535
- def self.optimizer_hints(*args); end
536
-
537
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
538
- def self.merge(*args); end
539
-
540
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
541
- def self.except(*args); end
542
-
543
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
544
- def self.only(*args); end
545
-
546
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
547
- def self.extending(*args, &block); end
548
-
549
445
  sig { returns(T.nilable(Wizard::Broom)) }
550
446
  def typed_broom; end
551
447
 
@@ -586,8 +482,7 @@ end
586
482
  class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
587
483
  include Wizard::ActiveRelation_WhereNot
588
484
  include Wizard::CustomFinderMethods
589
- extend T::Sig
590
- extend T::Generic
485
+ include Wizard::QueryMethodsReturningRelation
591
486
  Elem = type_member(fixed: Wizard)
592
487
 
593
488
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
@@ -700,112 +595,12 @@ class Wizard::ActiveRecord_Relation < ActiveRecord::Relation
700
595
 
701
596
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
702
597
  def with_attached_school_photo(*args); end
703
-
704
- sig { returns(Wizard::ActiveRecord_Relation) }
705
- def all; end
706
-
707
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
708
- def unscoped(&block); end
709
-
710
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
711
- def select(*args); end
712
-
713
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
714
- def reselect(*args); end
715
-
716
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
717
- def order(*args); end
718
-
719
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
720
- def reorder(*args); end
721
-
722
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
723
- def group(*args); end
724
-
725
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
726
- def limit(*args); end
727
-
728
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
729
- def offset(*args); end
730
-
731
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
732
- def joins(*args); end
733
-
734
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
735
- def left_joins(*args); end
736
-
737
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
738
- def left_outer_joins(*args); end
739
-
740
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
741
- def where(*args); end
742
-
743
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
744
- def rewhere(*args); end
745
-
746
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
747
- def preload(*args); end
748
-
749
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
750
- def extract_associated(*args); end
751
-
752
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
753
- def eager_load(*args); end
754
-
755
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
756
- def includes(*args); end
757
-
758
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
759
- def from(*args); end
760
-
761
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
762
- def lock(*args); end
763
-
764
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
765
- def readonly(*args); end
766
-
767
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
768
- def or(*args); end
769
-
770
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
771
- def having(*args); end
772
-
773
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
774
- def create_with(*args); end
775
-
776
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
777
- def distinct(*args); end
778
-
779
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
780
- def references(*args); end
781
-
782
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
783
- def none(*args); end
784
-
785
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
786
- def unscope(*args); end
787
-
788
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
789
- def optimizer_hints(*args); end
790
-
791
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
792
- def merge(*args); end
793
-
794
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
795
- def except(*args); end
796
-
797
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
798
- def only(*args); end
799
-
800
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
801
- def extending(*args, &block); end
802
598
  end
803
599
 
804
600
  class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
805
601
  include Wizard::ActiveRelation_WhereNot
806
602
  include Wizard::CustomFinderMethods
807
- extend T::Sig
808
- extend T::Generic
603
+ include Wizard::QueryMethodsReturningAssociationRelation
809
604
  Elem = type_member(fixed: Wizard)
810
605
 
811
606
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
@@ -918,111 +713,11 @@ class Wizard::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelati
918
713
 
919
714
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
920
715
  def with_attached_school_photo(*args); end
921
-
922
- sig { returns(Wizard::ActiveRecord_AssociationRelation) }
923
- def all; end
924
-
925
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
926
- def unscoped(&block); end
927
-
928
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
929
- def select(*args); end
930
-
931
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
932
- def reselect(*args); end
933
-
934
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
935
- def order(*args); end
936
-
937
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
938
- def reorder(*args); end
939
-
940
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
941
- def group(*args); end
942
-
943
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
944
- def limit(*args); end
945
-
946
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
947
- def offset(*args); end
948
-
949
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
950
- def joins(*args); end
951
-
952
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
953
- def left_joins(*args); end
954
-
955
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
956
- def left_outer_joins(*args); end
957
-
958
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
959
- def where(*args); end
960
-
961
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
962
- def rewhere(*args); end
963
-
964
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
965
- def preload(*args); end
966
-
967
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
968
- def extract_associated(*args); end
969
-
970
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
971
- def eager_load(*args); end
972
-
973
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
974
- def includes(*args); end
975
-
976
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
977
- def from(*args); end
978
-
979
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
980
- def lock(*args); end
981
-
982
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
983
- def readonly(*args); end
984
-
985
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
986
- def or(*args); end
987
-
988
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
989
- def having(*args); end
990
-
991
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
992
- def create_with(*args); end
993
-
994
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
995
- def distinct(*args); end
996
-
997
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
998
- def references(*args); end
999
-
1000
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1001
- def none(*args); end
1002
-
1003
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1004
- def unscope(*args); end
1005
-
1006
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1007
- def optimizer_hints(*args); end
1008
-
1009
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1010
- def merge(*args); end
1011
-
1012
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1013
- def except(*args); end
1014
-
1015
- sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1016
- def only(*args); end
1017
-
1018
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1019
- def extending(*args, &block); end
1020
716
  end
1021
717
 
1022
718
  class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
1023
719
  include Wizard::CustomFinderMethods
1024
- extend T::Sig
1025
- extend T::Generic
720
+ include Wizard::QueryMethodsReturningAssociationRelation
1026
721
  Elem = type_member(fixed: Wizard)
1027
722
 
1028
723
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
@@ -1136,10 +831,137 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
1136
831
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
1137
832
  def with_attached_school_photo(*args); end
1138
833
 
834
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
835
+ def <<(*records); end
836
+
837
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
838
+ def append(*records); end
839
+
840
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
841
+ def push(*records); end
842
+
843
+ sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
844
+ def concat(*records); end
845
+ end
846
+
847
+ module Wizard::QueryMethodsReturningRelation
848
+ sig { returns(Wizard::ActiveRecord_Relation) }
849
+ def all; end
850
+
851
+ sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
852
+ def unscoped(&block); end
853
+
854
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
855
+ def select(*args); end
856
+
857
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
858
+ def reselect(*args); end
859
+
860
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
861
+ def order(*args); end
862
+
863
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
864
+ def reorder(*args); end
865
+
866
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
867
+ def group(*args); end
868
+
869
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
870
+ def limit(*args); end
871
+
872
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
873
+ def offset(*args); end
874
+
875
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
876
+ def joins(*args); end
877
+
878
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
879
+ def left_joins(*args); end
880
+
881
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
882
+ def left_outer_joins(*args); end
883
+
884
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
885
+ def where(*args); end
886
+
887
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
888
+ def rewhere(*args); end
889
+
890
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
891
+ def preload(*args); end
892
+
893
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
894
+ def extract_associated(*args); end
895
+
896
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
897
+ def eager_load(*args); end
898
+
899
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
900
+ def includes(*args); end
901
+
902
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
903
+ def from(*args); end
904
+
905
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
906
+ def lock(*args); end
907
+
908
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
909
+ def readonly(*args); end
910
+
911
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
912
+ def or(*args); end
913
+
914
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
915
+ def having(*args); end
916
+
917
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
918
+ def create_with(*args); end
919
+
920
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
921
+ def distinct(*args); end
922
+
923
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
924
+ def references(*args); end
925
+
926
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
927
+ def none(*args); end
928
+
929
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
930
+ def unscope(*args); end
931
+
932
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
933
+ def optimizer_hints(*args); end
934
+
935
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
936
+ def merge(*args); end
937
+
938
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
939
+ def except(*args); end
940
+
941
+ sig { params(args: T.untyped).returns(Wizard::ActiveRecord_Relation) }
942
+ def only(*args); end
943
+
944
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
945
+ def extending(*args, &block); end
946
+
947
+ sig do
948
+ params(
949
+ of: T.nilable(Integer),
950
+ start: T.nilable(Integer),
951
+ finish: T.nilable(Integer),
952
+ load: T.nilable(T::Boolean),
953
+ error_on_ignore: T.nilable(T::Boolean),
954
+ block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_Relation).void)
955
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
956
+ end
957
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
958
+ end
959
+
960
+ module Wizard::QueryMethodsReturningAssociationRelation
1139
961
  sig { returns(Wizard::ActiveRecord_AssociationRelation) }
1140
962
  def all; end
1141
963
 
1142
- sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
964
+ sig { params(block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
1143
965
  def unscoped(&block); end
1144
966
 
1145
967
  sig { params(args: T.untyped).returns(Wizard::ActiveRecord_AssociationRelation) }
@@ -1235,26 +1057,24 @@ class Wizard::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associat
1235
1057
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1236
1058
  def extending(*args, &block); end
1237
1059
 
1238
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1239
- def <<(*records); end
1240
-
1241
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1242
- def append(*records); end
1243
-
1244
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1245
- def push(*records); end
1246
-
1247
- sig { params(records: T.any(Wizard, T::Array[Wizard])).returns(T.self_type) }
1248
- def concat(*records); end
1060
+ sig do
1061
+ params(
1062
+ of: T.nilable(Integer),
1063
+ start: T.nilable(Integer),
1064
+ finish: T.nilable(Integer),
1065
+ load: T.nilable(T::Boolean),
1066
+ error_on_ignore: T.nilable(T::Boolean),
1067
+ block: T.nilable(T.proc.params(e: Wizard::ActiveRecord_AssociationRelation).void)
1068
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
1069
+ end
1070
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
1249
1071
  end
1250
1072
 
1251
1073
  module Wizard::GeneratedAssociationMethods
1252
- extend T::Sig
1253
-
1254
1074
  sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
1255
1075
  def hats_attachments; end
1256
1076
 
1257
- sig { returns(T::Array[Integer]) }
1077
+ sig { returns(T::Array[T.untyped]) }
1258
1078
  def hats_attachment_ids; end
1259
1079
 
1260
1080
  sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
@@ -1263,7 +1083,7 @@ module Wizard::GeneratedAssociationMethods
1263
1083
  sig { returns(::ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy) }
1264
1084
  def hats_blobs; end
1265
1085
 
1266
- sig { returns(T::Array[Integer]) }
1086
+ sig { returns(T::Array[T.untyped]) }
1267
1087
  def hats_blob_ids; end
1268
1088
 
1269
1089
  sig { params(value: T::Enumerable[::ActiveStorage::Blob]).void }
@@ -1272,18 +1092,45 @@ module Wizard::GeneratedAssociationMethods
1272
1092
  sig { returns(T.nilable(T.untyped)) }
1273
1093
  def school; end
1274
1094
 
1095
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
1096
+ def build_school(*args, &block); end
1097
+
1098
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
1099
+ def create_school(*args, &block); end
1100
+
1101
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
1102
+ def create_school!(*args, &block); end
1103
+
1275
1104
  sig { params(value: T.nilable(T.untyped)).void }
1276
1105
  def school=(value); end
1277
1106
 
1278
1107
  sig { returns(T.nilable(::ActiveStorage::Attachment)) }
1279
1108
  def school_photo_attachment; end
1280
1109
 
1110
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
1111
+ def build_school_photo_attachment(*args, &block); end
1112
+
1113
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
1114
+ def create_school_photo_attachment(*args, &block); end
1115
+
1116
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
1117
+ def create_school_photo_attachment!(*args, &block); end
1118
+
1281
1119
  sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
1282
1120
  def school_photo_attachment=(value); end
1283
1121
 
1284
1122
  sig { returns(T.nilable(::ActiveStorage::Blob)) }
1285
1123
  def school_photo_blob; end
1286
1124
 
1125
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
1126
+ def build_school_photo_blob(*args, &block); end
1127
+
1128
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
1129
+ def create_school_photo_blob(*args, &block); end
1130
+
1131
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
1132
+ def create_school_photo_blob!(*args, &block); end
1133
+
1287
1134
  sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
1288
1135
  def school_photo_blob=(value); end
1289
1136
 
@@ -1302,6 +1149,15 @@ module Wizard::GeneratedAssociationMethods
1302
1149
  sig { returns(T.nilable(::Wand)) }
1303
1150
  def wand; end
1304
1151
 
1152
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
1153
+ def build_wand(*args, &block); end
1154
+
1155
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
1156
+ def create_wand(*args, &block); end
1157
+
1158
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
1159
+ def create_wand!(*args, &block); end
1160
+
1305
1161
  sig { params(value: T.nilable(::Wand)).void }
1306
1162
  def wand=(value); end
1307
1163
 
@@ -1315,5 +1171,5 @@ module Wizard::GeneratedAssociationMethods
1315
1171
  def hats; end
1316
1172
 
1317
1173
  sig { params(attachables: T.untyped).returns(T.untyped) }
1318
- def hats=(*attachables); end
1174
+ def hats=(attachables); end
1319
1175
  end