sorbet-rails 0.7.31 → 0.7.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +13 -0
  4. data/lib/sorbet-rails/rails_mixins/custom_finder_methods.rb +8 -0
  5. data/spec/custom_finder_methods_spec.rb +23 -0
  6. data/spec/support/v6.1/sorbet_test_cases.rb +3 -0
  7. data/spec/test_data/v6.1/expected_attachment.rbi +6 -0
  8. data/spec/test_data/v6.1/expected_blob.rbi +6 -0
  9. data/spec/test_data/v6.1/expected_headmaster.rbi +6 -0
  10. data/spec/test_data/v6.1/expected_internal_metadata.rbi +6 -0
  11. data/spec/test_data/v6.1/expected_potion.rbi +6 -0
  12. data/spec/test_data/v6.1/expected_record.rbi +6 -0
  13. data/spec/test_data/v6.1/expected_robe.rbi +6 -0
  14. data/spec/test_data/v6.1/expected_schema_migration.rbi +6 -0
  15. data/spec/test_data/v6.1/expected_school.rbi +6 -0
  16. data/spec/test_data/v6.1/expected_spell/habtm_spell_books.rbi +6 -0
  17. data/spec/test_data/v6.1/expected_spell.rbi +6 -0
  18. data/spec/test_data/v6.1/expected_spell_book/habtm_spells.rbi +6 -0
  19. data/spec/test_data/v6.1/expected_spell_book.rbi +6 -0
  20. data/spec/test_data/v6.1/expected_squib.rbi +6 -0
  21. data/spec/test_data/v6.1/expected_subject/habtm_wizards.rbi +6 -0
  22. data/spec/test_data/v6.1/expected_subject.rbi +6 -0
  23. data/spec/test_data/v6.1/expected_variant_record.rbi +6 -0
  24. data/spec/test_data/v6.1/expected_wand.rbi +6 -0
  25. data/spec/test_data/v6.1/expected_wizard/habtm_subjects.rbi +6 -0
  26. data/spec/test_data/v6.1/expected_wizard.rbi +6 -0
  27. data/spec/test_data/v6.1/expected_wizard_wo_spellbook.rbi +6 -0
  28. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c8486bf0c5537443c859e1f51c4aebd3e62bd16370f78526a4f2e879b148c81
4
- data.tar.gz: ffd9da9622e74e186ae94eb9547da174df0e86e294373b06bbdf4caf4d71736f
3
+ metadata.gz: 1f9112e94df476390ee1e37395d768767b9dc60df915a4ccb8ca7b52ef7db1b8
4
+ data.tar.gz: e1862f16666bebdffcdf6957d1d1af1c68c4a2a68c4f1eec58bb3c6d27f97bbe
5
5
  SHA512:
6
- metadata.gz: e9b9d08940d9c0c82984326439fd8c310955e6c3c59a1b6ed01c46c5ab05ca71680e9627f0bef456942ad2c08430d216ad969a0506c2478c0fec5863a3bb3d32
7
- data.tar.gz: 82f9e89b908de82b1a63f02f60cef7aea5ded0108c2717b3e3aa1ee0ac2ee534476327fb5483a155d98d95f9f35640534ce133a2b017daf31797844725a91138
6
+ metadata.gz: 168182493ff09546dfa5aefd068a9d08ca91aa675eeead40dedbe2e0674dd1c6fe47ef86e4080d67034cf68114298acaa1e7c35c50641c181bfc74c1a04ac023
7
+ data.tar.gz: 83ced287974ba0f6285434e8abf31ea6183ce3646d2925ad6342896fedffbd0fc6264a59cbab790e637a4469f168ba5e1b8303202ec16edf398b80160b3e1d6c
data/README.md CHANGED
@@ -287,6 +287,7 @@ specific environment group (eg. `development` only).
287
287
 
288
288
  - Model: The gem provides some helper method to a model to make type-checking easier:
289
289
  - `find_n`, `first_n`, `last_n`
290
+ - `where_missing`
290
291
  - `pluck_to_tstruct`
291
292
  - `typed_enum`
292
293
 
@@ -455,6 +456,18 @@ If you run into the following issue when running rspec, it's likely because you'
455
456
  if you're really stuck.
456
457
  ```
457
458
 
459
+ ### `where.missing` does not exist on `ActiveRecord::Relation` ###
460
+
461
+ The [`where` method](https://apidock.com/rails/ActiveRecord/QueryMethods/where) in Rails has two modes: it can be passed no arguments where it will return an `ActiveRecord::QueryMethods::WhereChain` object, or when given arguments, returns an `ActiveRecord::Relation` object. By default we've opted to support `where` with arguments and have provided a `where_missing` method to avoid conflicts during static typing.
462
+
463
+ ```
464
+ Wizard.where.missing(:wand) # sorbet error, use `where_missing` instead
465
+
466
+ Wizard.where_missing(:wand) # valid, returns a relation
467
+ ```
468
+
469
+ **Note:** `where.missing` / `where_missing` are only available in Rails 6.1 or above
470
+
458
471
  ## Extending RBI Generation logic
459
472
 
460
473
  ### Extending Model Generation Task with Custom Plugins
@@ -64,6 +64,19 @@ class SorbetRails::ModelPlugins::ActiveRecordQuerying < SorbetRails::ModelPlugin
64
64
  )
65
65
  end
66
66
 
67
+ # https://api.rubyonrails.org/v6.1.4/classes/ActiveRecord/QueryMethods/WhereChain.html#method-i-missing
68
+ # where.missing is only available in Rails 6.1 and above
69
+ if Rails.version >= "6.1"
70
+ add_relation_query_method(
71
+ root,
72
+ "where_missing", # where_missing is injected by sorbet-rails
73
+ parameters: [
74
+ Parameter.new("*args", type: "Symbol"),
75
+ ],
76
+ builtin_query_method: true,
77
+ )
78
+ end
79
+
67
80
  add_relation_query_method(
68
81
  root,
69
82
  "extending",
@@ -26,5 +26,13 @@ module SorbetRails
26
26
  def find_by_id!(id)
27
27
  find_by!(id: id)
28
28
  end
29
+
30
+ # where.missing is only available in Rails 6.1 and above
31
+ if Rails.version >= "6.1"
32
+ # https://api.rubyonrails.org/v6.1.4/classes/ActiveRecord/QueryMethods/WhereChain.html#method-i-missing
33
+ def where_missing(*args)
34
+ where.missing(*args)
35
+ end
36
+ end
29
37
  end
30
38
  end
@@ -77,4 +77,27 @@ RSpec.describe SorbetRails::CustomFinderMethods do
77
77
  expect(wizards_3).to eq([harry, ron, hermione])
78
78
  end
79
79
  end
80
+
81
+ context 'test where_missing' do
82
+ # where.missing is only available in Rails 6.1 and above
83
+ if Rails.version < "6.1"
84
+ it 'raises an error' do
85
+ expect { Wizard.where_missing(:wand) }.to raise_error(NoMethodError)
86
+ end
87
+ else
88
+ it 'works with no arguments' do
89
+ missing_with_no_args = Wizard.where_missing
90
+ all_wizards = Wizard.all
91
+
92
+ expect(missing_with_no_args).to eq(all_wizards)
93
+ end
94
+
95
+ it 'retrieves wizards with missing wands' do
96
+ elder_wand = Wand.create!(wizard: harry, wood_type: :holly, core_type: :phoenix_feather)
97
+ wizards_without_wands = Wizard.where_missing(:wand).to_a
98
+
99
+ expect(wizards_without_wands).to eq(Wizard.all.to_a - [harry])
100
+ end
101
+ end
102
+ end
80
103
  end
@@ -86,6 +86,7 @@ T.assert_type!(Wizard.eager_load(:spell_books), Wizard::ActiveRecord_Relation)
86
86
  T.assert_type!(Wizard.order(:id), Wizard::ActiveRecord_Relation)
87
87
  T.assert_type!(Wizard.select { |r| r.id == 1 }, T::Array[Wizard])
88
88
  T.assert_type!(Wizard.select_columns(:id, :name), Wizard::ActiveRecord_Relation)
89
+ T.assert_type!(Wizard.where_missing(:wand), Wizard::ActiveRecord_Relation)
89
90
 
90
91
  # Finder methods -- ActiveRecord::Relation
91
92
  T.assert_type!(Wizard.all.exists?(name: 'Harry Potter'), T::Boolean)
@@ -150,6 +151,7 @@ T.assert_type!(Wizard.all.eager_load(:spell_books), Wizard::ActiveRecord_Relatio
150
151
  T.assert_type!(Wizard.all.order(:id), Wizard::ActiveRecord_Relation)
151
152
  T.assert_type!(Wizard.all.select { |r| r.id == 1 }, T::Array[Wizard])
152
153
  T.assert_type!(Wizard.all.select_columns(:id, :name), Wizard::ActiveRecord_Relation)
154
+ T.assert_type!(Wizard.all.where_missing(:wand), Wizard::ActiveRecord_Relation)
153
155
  # Enumerable methods
154
156
  Wizard.all.each { |w| T.assert_type!(w, Wizard) }
155
157
  Wizard.all.map { |w| T.assert_type!(w, Wizard) }
@@ -220,6 +222,7 @@ T.assert_type!(spell_books.eager_load(:wizard), SpellBook::ActiveRecord_Associat
220
222
  T.assert_type!(spell_books.order(:id), SpellBook::ActiveRecord_AssociationRelation)
221
223
  T.assert_type!(spell_books.select { |r| r.id == 1 }, T::Array[SpellBook])
222
224
  T.assert_type!(spell_books.select_columns(:id, :name), SpellBook::ActiveRecord_AssociationRelation)
225
+ T.assert_type!(spell_books.where_missing(:wizard), SpellBook::ActiveRecord_AssociationRelation)
223
226
 
224
227
  # Enumerable methods
225
228
  spell_books.each { |s| T.assert_type!(s, SpellBook) }
@@ -169,6 +169,9 @@ module ActiveStorage::Attachment::QueryMethodsReturningRelation
169
169
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
170
170
  def select_columns(*args); end
171
171
 
172
+ sig { params(args: Symbol).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
173
+ def where_missing(*args); end
174
+
172
175
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
173
176
  def extending(*args, &block); end
174
177
 
@@ -285,6 +288,9 @@ module ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
285
288
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
286
289
  def select_columns(*args); end
287
290
 
291
+ sig { params(args: Symbol).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
292
+ def where_missing(*args); end
293
+
288
294
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
289
295
  def extending(*args, &block); end
290
296
 
@@ -187,6 +187,9 @@ module ActiveStorage::Blob::QueryMethodsReturningRelation
187
187
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
188
188
  def select_columns(*args); end
189
189
 
190
+ sig { params(args: Symbol).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
191
+ def where_missing(*args); end
192
+
190
193
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
191
194
  def extending(*args, &block); end
192
195
 
@@ -303,6 +306,9 @@ module ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
303
306
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
304
307
  def select_columns(*args); end
305
308
 
309
+ sig { params(args: Symbol).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
310
+ def where_missing(*args); end
311
+
306
312
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
307
313
  def extending(*args, &block); end
308
314
 
@@ -199,6 +199,9 @@ module Headmaster::QueryMethodsReturningRelation
199
199
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Headmaster::ActiveRecord_Relation) }
200
200
  def select_columns(*args); end
201
201
 
202
+ sig { params(args: Symbol).returns(Headmaster::ActiveRecord_Relation) }
203
+ def where_missing(*args); end
204
+
202
205
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Headmaster::ActiveRecord_Relation) }
203
206
  def extending(*args, &block); end
204
207
 
@@ -315,6 +318,9 @@ module Headmaster::QueryMethodsReturningAssociationRelation
315
318
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Headmaster::ActiveRecord_AssociationRelation) }
316
319
  def select_columns(*args); end
317
320
 
321
+ sig { params(args: Symbol).returns(Headmaster::ActiveRecord_AssociationRelation) }
322
+ def where_missing(*args); end
323
+
318
324
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Headmaster::ActiveRecord_AssociationRelation) }
319
325
  def extending(*args, &block); end
320
326
 
@@ -169,6 +169,9 @@ module ActiveRecord::InternalMetadata::QueryMethodsReturningRelation
169
169
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
170
170
  def select_columns(*args); end
171
171
 
172
+ sig { params(args: Symbol).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
173
+ def where_missing(*args); end
174
+
172
175
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
173
176
  def extending(*args, &block); end
174
177
 
@@ -285,6 +288,9 @@ module ActiveRecord::InternalMetadata::QueryMethodsReturningAssociationRelation
285
288
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
286
289
  def select_columns(*args); end
287
290
 
291
+ sig { params(args: Symbol).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
292
+ def where_missing(*args); end
293
+
288
294
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_AssociationRelation) }
289
295
  def extending(*args, &block); end
290
296
 
@@ -151,6 +151,9 @@ module Potion::QueryMethodsReturningRelation
151
151
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Potion::ActiveRecord_Relation) }
152
152
  def select_columns(*args); end
153
153
 
154
+ sig { params(args: Symbol).returns(Potion::ActiveRecord_Relation) }
155
+ def where_missing(*args); end
156
+
154
157
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Potion::ActiveRecord_Relation) }
155
158
  def extending(*args, &block); end
156
159
 
@@ -267,6 +270,9 @@ module Potion::QueryMethodsReturningAssociationRelation
267
270
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Potion::ActiveRecord_AssociationRelation) }
268
271
  def select_columns(*args); end
269
272
 
273
+ sig { params(args: Symbol).returns(Potion::ActiveRecord_AssociationRelation) }
274
+ def where_missing(*args); end
275
+
270
276
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Potion::ActiveRecord_AssociationRelation) }
271
277
  def extending(*args, &block); end
272
278
 
@@ -130,6 +130,9 @@ module ActiveStorage::Record::QueryMethodsReturningRelation
130
130
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::Record::ActiveRecord_Relation) }
131
131
  def select_columns(*args); end
132
132
 
133
+ sig { params(args: Symbol).returns(ActiveStorage::Record::ActiveRecord_Relation) }
134
+ def where_missing(*args); end
135
+
133
136
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Record::ActiveRecord_Relation) }
134
137
  def extending(*args, &block); end
135
138
 
@@ -246,6 +249,9 @@ module ActiveStorage::Record::QueryMethodsReturningAssociationRelation
246
249
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::Record::ActiveRecord_AssociationRelation) }
247
250
  def select_columns(*args); end
248
251
 
252
+ sig { params(args: Symbol).returns(ActiveStorage::Record::ActiveRecord_AssociationRelation) }
253
+ def where_missing(*args); end
254
+
249
255
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Record::ActiveRecord_AssociationRelation) }
250
256
  def extending(*args, &block); end
251
257
 
@@ -172,6 +172,9 @@ module Robe::QueryMethodsReturningRelation
172
172
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Robe::ActiveRecord_Relation) }
173
173
  def select_columns(*args); end
174
174
 
175
+ sig { params(args: Symbol).returns(Robe::ActiveRecord_Relation) }
176
+ def where_missing(*args); end
177
+
175
178
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Robe::ActiveRecord_Relation) }
176
179
  def extending(*args, &block); end
177
180
 
@@ -288,6 +291,9 @@ module Robe::QueryMethodsReturningAssociationRelation
288
291
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Robe::ActiveRecord_AssociationRelation) }
289
292
  def select_columns(*args); end
290
293
 
294
+ sig { params(args: Symbol).returns(Robe::ActiveRecord_AssociationRelation) }
295
+ def where_missing(*args); end
296
+
291
297
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Robe::ActiveRecord_AssociationRelation) }
292
298
  def extending(*args, &block); end
293
299
 
@@ -142,6 +142,9 @@ module ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
142
142
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
143
143
  def select_columns(*args); end
144
144
 
145
+ sig { params(args: Symbol).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
146
+ def where_missing(*args); end
147
+
145
148
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
146
149
  def extending(*args, &block); end
147
150
 
@@ -258,6 +261,9 @@ module ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
258
261
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
259
262
  def select_columns(*args); end
260
263
 
264
+ sig { params(args: Symbol).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
265
+ def where_missing(*args); end
266
+
261
267
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
262
268
  def extending(*args, &block); end
263
269
 
@@ -172,6 +172,9 @@ module School::QueryMethodsReturningRelation
172
172
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(School::ActiveRecord_Relation) }
173
173
  def select_columns(*args); end
174
174
 
175
+ sig { params(args: Symbol).returns(School::ActiveRecord_Relation) }
176
+ def where_missing(*args); end
177
+
175
178
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_Relation) }
176
179
  def extending(*args, &block); end
177
180
 
@@ -288,6 +291,9 @@ module School::QueryMethodsReturningAssociationRelation
288
291
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(School::ActiveRecord_AssociationRelation) }
289
292
  def select_columns(*args); end
290
293
 
294
+ sig { params(args: Symbol).returns(School::ActiveRecord_AssociationRelation) }
295
+ def where_missing(*args); end
296
+
291
297
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(School::ActiveRecord_AssociationRelation) }
292
298
  def extending(*args, &block); end
293
299
 
@@ -190,6 +190,9 @@ module Spell::HABTM_SpellBooks::QueryMethodsReturningRelation
190
190
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
191
191
  def select_columns(*args); end
192
192
 
193
+ sig { params(args: Symbol).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
194
+ def where_missing(*args); end
195
+
193
196
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_Relation) }
194
197
  def extending(*args, &block); end
195
198
 
@@ -306,6 +309,9 @@ module Spell::HABTM_SpellBooks::QueryMethodsReturningAssociationRelation
306
309
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
307
310
  def select_columns(*args); end
308
311
 
312
+ sig { params(args: Symbol).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
313
+ def where_missing(*args); end
314
+
309
315
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::HABTM_SpellBooks::ActiveRecord_AssociationRelation) }
310
316
  def extending(*args, &block); end
311
317
 
@@ -163,6 +163,9 @@ module Spell::QueryMethodsReturningRelation
163
163
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Spell::ActiveRecord_Relation) }
164
164
  def select_columns(*args); end
165
165
 
166
+ sig { params(args: Symbol).returns(Spell::ActiveRecord_Relation) }
167
+ def where_missing(*args); end
168
+
166
169
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_Relation) }
167
170
  def extending(*args, &block); end
168
171
 
@@ -279,6 +282,9 @@ module Spell::QueryMethodsReturningAssociationRelation
279
282
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Spell::ActiveRecord_AssociationRelation) }
280
283
  def select_columns(*args); end
281
284
 
285
+ sig { params(args: Symbol).returns(Spell::ActiveRecord_AssociationRelation) }
286
+ def where_missing(*args); end
287
+
282
288
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Spell::ActiveRecord_AssociationRelation) }
283
289
  def extending(*args, &block); end
284
290
 
@@ -190,6 +190,9 @@ module SpellBook::HABTM_Spells::QueryMethodsReturningRelation
190
190
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
191
191
  def select_columns(*args); end
192
192
 
193
+ sig { params(args: Symbol).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
194
+ def where_missing(*args); end
195
+
193
196
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_Relation) }
194
197
  def extending(*args, &block); end
195
198
 
@@ -306,6 +309,9 @@ module SpellBook::HABTM_Spells::QueryMethodsReturningAssociationRelation
306
309
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
307
310
  def select_columns(*args); end
308
311
 
312
+ sig { params(args: Symbol).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
313
+ def where_missing(*args); end
314
+
309
315
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::HABTM_Spells::ActiveRecord_AssociationRelation) }
310
316
  def extending(*args, &block); end
311
317
 
@@ -354,6 +354,9 @@ module SpellBook::QueryMethodsReturningRelation
354
354
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(SpellBook::ActiveRecord_Relation) }
355
355
  def select_columns(*args); end
356
356
 
357
+ sig { params(args: Symbol).returns(SpellBook::ActiveRecord_Relation) }
358
+ def where_missing(*args); end
359
+
357
360
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
358
361
  def extending(*args, &block); end
359
362
 
@@ -470,6 +473,9 @@ module SpellBook::QueryMethodsReturningAssociationRelation
470
473
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(SpellBook::ActiveRecord_AssociationRelation) }
471
474
  def select_columns(*args); end
472
475
 
476
+ sig { params(args: Symbol).returns(SpellBook::ActiveRecord_AssociationRelation) }
477
+ def where_missing(*args); end
478
+
473
479
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_AssociationRelation) }
474
480
  def extending(*args, &block); end
475
481
 
@@ -1027,6 +1027,9 @@ module Squib::QueryMethodsReturningRelation
1027
1027
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Squib::ActiveRecord_Relation) }
1028
1028
  def select_columns(*args); end
1029
1029
 
1030
+ sig { params(args: Symbol).returns(Squib::ActiveRecord_Relation) }
1031
+ def where_missing(*args); end
1032
+
1030
1033
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_Relation) }
1031
1034
  def extending(*args, &block); end
1032
1035
 
@@ -1143,6 +1146,9 @@ module Squib::QueryMethodsReturningAssociationRelation
1143
1146
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Squib::ActiveRecord_AssociationRelation) }
1144
1147
  def select_columns(*args); end
1145
1148
 
1149
+ sig { params(args: Symbol).returns(Squib::ActiveRecord_AssociationRelation) }
1150
+ def where_missing(*args); end
1151
+
1146
1152
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Squib::ActiveRecord_AssociationRelation) }
1147
1153
  def extending(*args, &block); end
1148
1154
 
@@ -190,6 +190,9 @@ module Subject::HABTM_Wizards::QueryMethodsReturningRelation
190
190
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
191
191
  def select_columns(*args); end
192
192
 
193
+ sig { params(args: Symbol).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
194
+ def where_missing(*args); end
195
+
193
196
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_Relation) }
194
197
  def extending(*args, &block); end
195
198
 
@@ -306,6 +309,9 @@ module Subject::HABTM_Wizards::QueryMethodsReturningAssociationRelation
306
309
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
307
310
  def select_columns(*args); end
308
311
 
312
+ sig { params(args: Symbol).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
313
+ def where_missing(*args); end
314
+
309
315
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::HABTM_Wizards::ActiveRecord_AssociationRelation) }
310
316
  def extending(*args, &block); end
311
317
 
@@ -163,6 +163,9 @@ module Subject::QueryMethodsReturningRelation
163
163
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Subject::ActiveRecord_Relation) }
164
164
  def select_columns(*args); end
165
165
 
166
+ sig { params(args: Symbol).returns(Subject::ActiveRecord_Relation) }
167
+ def where_missing(*args); end
168
+
166
169
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_Relation) }
167
170
  def extending(*args, &block); end
168
171
 
@@ -279,6 +282,9 @@ module Subject::QueryMethodsReturningAssociationRelation
279
282
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Subject::ActiveRecord_AssociationRelation) }
280
283
  def select_columns(*args); end
281
284
 
285
+ sig { params(args: Symbol).returns(Subject::ActiveRecord_AssociationRelation) }
286
+ def where_missing(*args); end
287
+
282
288
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Subject::ActiveRecord_AssociationRelation) }
283
289
  def extending(*args, &block); end
284
290
 
@@ -175,6 +175,9 @@ module ActiveStorage::VariantRecord::QueryMethodsReturningRelation
175
175
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::VariantRecord::ActiveRecord_Relation) }
176
176
  def select_columns(*args); end
177
177
 
178
+ sig { params(args: Symbol).returns(ActiveStorage::VariantRecord::ActiveRecord_Relation) }
179
+ def where_missing(*args); end
180
+
178
181
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::VariantRecord::ActiveRecord_Relation) }
179
182
  def extending(*args, &block); end
180
183
 
@@ -291,6 +294,9 @@ module ActiveStorage::VariantRecord::QueryMethodsReturningAssociationRelation
291
294
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(ActiveStorage::VariantRecord::ActiveRecord_AssociationRelation) }
292
295
  def select_columns(*args); end
293
296
 
297
+ sig { params(args: Symbol).returns(ActiveStorage::VariantRecord::ActiveRecord_AssociationRelation) }
298
+ def where_missing(*args); end
299
+
294
300
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::VariantRecord::ActiveRecord_AssociationRelation) }
295
301
  def extending(*args, &block); end
296
302
 
@@ -466,6 +466,9 @@ module Wand::QueryMethodsReturningRelation
466
466
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wand::ActiveRecord_Relation) }
467
467
  def select_columns(*args); end
468
468
 
469
+ sig { params(args: Symbol).returns(Wand::ActiveRecord_Relation) }
470
+ def where_missing(*args); end
471
+
469
472
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
470
473
  def extending(*args, &block); end
471
474
 
@@ -582,6 +585,9 @@ module Wand::QueryMethodsReturningAssociationRelation
582
585
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wand::ActiveRecord_AssociationRelation) }
583
586
  def select_columns(*args); end
584
587
 
588
+ sig { params(args: Symbol).returns(Wand::ActiveRecord_AssociationRelation) }
589
+ def where_missing(*args); end
590
+
585
591
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
586
592
  def extending(*args, &block); end
587
593
 
@@ -190,6 +190,9 @@ module Wizard::HABTM_Subjects::QueryMethodsReturningRelation
190
190
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
191
191
  def select_columns(*args); end
192
192
 
193
+ sig { params(args: Symbol).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
194
+ def where_missing(*args); end
195
+
193
196
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_Relation) }
194
197
  def extending(*args, &block); end
195
198
 
@@ -306,6 +309,9 @@ module Wizard::HABTM_Subjects::QueryMethodsReturningAssociationRelation
306
309
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
307
310
  def select_columns(*args); end
308
311
 
312
+ sig { params(args: Symbol).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
313
+ def where_missing(*args); end
314
+
309
315
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::HABTM_Subjects::ActiveRecord_AssociationRelation) }
310
316
  def extending(*args, &block); end
311
317
 
@@ -1103,6 +1103,9 @@ module Wizard::QueryMethodsReturningRelation
1103
1103
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_Relation) }
1104
1104
  def select_columns(*args); end
1105
1105
 
1106
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_Relation) }
1107
+ def where_missing(*args); end
1108
+
1106
1109
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
1107
1110
  def extending(*args, &block); end
1108
1111
 
@@ -1219,6 +1222,9 @@ module Wizard::QueryMethodsReturningAssociationRelation
1219
1222
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_AssociationRelation) }
1220
1223
  def select_columns(*args); end
1221
1224
 
1225
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_AssociationRelation) }
1226
+ def where_missing(*args); end
1227
+
1222
1228
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1223
1229
  def extending(*args, &block); end
1224
1230
 
@@ -1103,6 +1103,9 @@ module Wizard::QueryMethodsReturningRelation
1103
1103
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_Relation) }
1104
1104
  def select_columns(*args); end
1105
1105
 
1106
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_Relation) }
1107
+ def where_missing(*args); end
1108
+
1106
1109
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_Relation) }
1107
1110
  def extending(*args, &block); end
1108
1111
 
@@ -1219,6 +1222,9 @@ module Wizard::QueryMethodsReturningAssociationRelation
1219
1222
  sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(Wizard::ActiveRecord_AssociationRelation) }
1220
1223
  def select_columns(*args); end
1221
1224
 
1225
+ sig { params(args: Symbol).returns(Wizard::ActiveRecord_AssociationRelation) }
1226
+ def where_missing(*args); end
1227
+
1222
1228
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wizard::ActiveRecord_AssociationRelation) }
1223
1229
  def extending(*args, &block); end
1224
1230
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.31
4
+ version: 0.7.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chan Zuckerberg Initiative