sorbet-rails 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +3 -3
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +0 -2
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +301 -0
- data/lib/sorbet-rails/config.rb +0 -1
- data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +11 -0
- data/lib/sorbet-rails/deprecation.rb +5 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +36 -8
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +20 -9
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/base.rb +10 -0
- data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +0 -50
- data/lib/sorbet-rails/model_plugins/plugins.rb +0 -3
- data/lib/sorbet-rails/model_rbi_formatter.rb +6 -10
- data/lib/sorbet-rails/model_utils.rb +83 -36
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/tasks/rails_rbi.rake +32 -24
- data/sorbet-rails.gemspec +2 -2
- data/spec/active_record_rbi_formatter_spec.rb +24 -0
- data/spec/generators/rails-template.rb +90 -6
- data/spec/generators/sorbet_test_cases.rb +204 -122
- data/spec/model_rbi_formatter_spec.rb +1 -1
- data/spec/rails_helper.rb +14 -1
- data/spec/rake_rails_rbi_active_record_spec.rb +21 -0
- data/spec/rake_rails_rbi_models_spec.rb +7 -0
- data/spec/sorbet_spec.rb +12 -1
- data/spec/support/v5.0/Gemfile.lock +8 -8
- data/spec/support/v5.0/app/models/headmaster.rb +8 -0
- data/spec/support/v5.0/app/models/school.rb +2 -0
- data/spec/support/v5.0/app/models/spell.rb +5 -0
- data/spec/support/v5.0/app/models/spell_book.rb +5 -0
- data/spec/support/v5.0/app/models/subject.rb +5 -0
- data/spec/support/v5.0/app/models/wizard.rb +6 -1
- data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.0/db/schema.rb +28 -1
- data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +204 -122
- data/spec/support/v5.1/Gemfile.lock +8 -8
- data/spec/support/v5.1/app/models/headmaster.rb +8 -0
- data/spec/support/v5.1/app/models/school.rb +2 -0
- data/spec/support/v5.1/app/models/spell.rb +5 -0
- data/spec/support/v5.1/app/models/spell_book.rb +5 -0
- data/spec/support/v5.1/app/models/subject.rb +5 -0
- data/spec/support/v5.1/app/models/wizard.rb +6 -1
- data/spec/support/v5.1/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.1/db/schema.rb +28 -1
- data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +204 -122
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/headmaster.rb +8 -0
- data/spec/support/v5.2/app/models/school.rb +2 -0
- data/spec/support/v5.2/app/models/spell.rb +5 -0
- data/spec/support/v5.2/app/models/spell_book.rb +5 -0
- data/spec/support/v5.2/app/models/subject.rb +5 -0
- data/spec/support/v5.2/app/models/wizard.rb +5 -0
- data/spec/support/v5.2/config/puma.rb +3 -0
- data/spec/support/v5.2/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.2/db/schema.rb +28 -1
- data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +204 -122
- data/spec/support/v6.0/Gemfile.lock +8 -8
- data/spec/support/v6.0/app/models/headmaster.rb +8 -0
- data/spec/support/v6.0/app/models/school.rb +2 -0
- data/spec/support/v6.0/app/models/spell.rb +5 -0
- data/spec/support/v6.0/app/models/spell_book.rb +5 -0
- data/spec/support/v6.0/app/models/subject.rb +5 -0
- data/spec/support/v6.0/app/models/wizard.rb +6 -1
- data/spec/support/v6.0/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v6.0/db/schema.rb +28 -1
- data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +204 -122
- data/spec/test_data/v5.0/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +199 -0
- data/spec/test_data/v5.0/expected_habtm_subjects.rbi +660 -0
- data/spec/test_data/v5.0/expected_habtm_wizards.rbi +660 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +304 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +38 -401
- data/spec/test_data/v5.0/expected_potion.rbi +38 -401
- data/spec/test_data/v5.0/expected_robe.rbi +38 -403
- data/spec/test_data/v5.0/expected_schema_migration.rbi +38 -401
- data/spec/test_data/v5.0/expected_school.rbi +47 -401
- data/spec/test_data/v5.0/expected_spell.rbi +292 -0
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +295 -0
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -432
- data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +637 -0
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +295 -0
- data/spec/test_data/v5.0/expected_squib.rbi +122 -477
- data/spec/test_data/v5.0/expected_subject.rbi +292 -0
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +295 -0
- data/spec/test_data/v5.0/expected_wand.rbi +75 -442
- data/spec/test_data/v5.0/expected_wizard.rbi +144 -498
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +295 -0
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +138 -498
- data/spec/test_data/v5.1/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +178 -0
- data/spec/test_data/v5.1/expected_habtm_subjects.rbi +672 -0
- data/spec/test_data/v5.1/expected_habtm_wizards.rbi +672 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +310 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +38 -407
- data/spec/test_data/v5.1/expected_potion.rbi +38 -407
- data/spec/test_data/v5.1/expected_robe.rbi +38 -409
- data/spec/test_data/v5.1/expected_schema_migration.rbi +38 -407
- data/spec/test_data/v5.1/expected_school.rbi +47 -407
- data/spec/test_data/v5.1/expected_spell.rbi +298 -0
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +301 -0
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -438
- data/spec/test_data/v5.1/expected_spell_book/habtm_spell_books.rbi +649 -0
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +301 -0
- data/spec/test_data/v5.1/expected_squib.rbi +123 -484
- data/spec/test_data/v5.1/expected_subject.rbi +298 -0
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +301 -0
- data/spec/test_data/v5.1/expected_wand.rbi +75 -448
- data/spec/test_data/v5.1/expected_wizard.rbi +145 -505
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +301 -0
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +139 -505
- data/spec/test_data/v5.2/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +175 -0
- data/spec/test_data/v5.2/expected_attachment.rbi +38 -407
- data/spec/test_data/v5.2/expected_blob.rbi +60 -426
- data/spec/test_data/v5.2/expected_habtm_subjects.rbi +672 -0
- data/spec/test_data/v5.2/expected_habtm_wizards.rbi +672 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +310 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +38 -407
- data/spec/test_data/v5.2/expected_potion.rbi +38 -407
- data/spec/test_data/v5.2/expected_robe.rbi +38 -409
- data/spec/test_data/v5.2/expected_schema_migration.rbi +38 -407
- data/spec/test_data/v5.2/expected_school.rbi +47 -407
- data/spec/test_data/v5.2/expected_spell.rbi +298 -0
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +301 -0
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -438
- data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +649 -0
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +301 -0
- data/spec/test_data/v5.2/expected_squib.rbi +133 -488
- data/spec/test_data/v5.2/expected_subject.rbi +298 -0
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +301 -0
- data/spec/test_data/v5.2/expected_wand.rbi +75 -448
- data/spec/test_data/v5.2/expected_wizard.rbi +155 -509
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +301 -0
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -509
- data/spec/test_data/v6.0/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +175 -0
- data/spec/test_data/v6.0/expected_attachment.rbi +38 -431
- data/spec/test_data/v6.0/expected_blob.rbi +60 -450
- data/spec/test_data/v6.0/expected_habtm_subjects.rbi +720 -0
- data/spec/test_data/v6.0/expected_habtm_wizards.rbi +720 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +334 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +38 -431
- data/spec/test_data/v6.0/expected_potion.rbi +38 -431
- data/spec/test_data/v6.0/expected_robe.rbi +38 -433
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +38 -431
- data/spec/test_data/v6.0/expected_school.rbi +47 -431
- data/spec/test_data/v6.0/expected_spell.rbi +322 -0
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +325 -0
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -474
- data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +697 -0
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +325 -0
- data/spec/test_data/v6.0/expected_squib.rbi +162 -541
- data/spec/test_data/v6.0/expected_subject.rbi +322 -0
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +325 -0
- data/spec/test_data/v6.0/expected_wand.rbi +91 -488
- data/spec/test_data/v6.0/expected_wizard.rbi +184 -562
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +325 -0
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +178 -562
- metadata +170 -24
- data/lib/bundled_rbi/active_record_base.rbi +0 -83
- data/lib/bundled_rbi/active_record_relation.rbi +0 -122
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -32
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -35
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +0 -131
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -46
- data/spec/boolean_string_spec.rb +0 -59
- data/spec/custom_params_methods_spec.rb +0 -138
- data/spec/integer_string_spec.rb +0 -46
- data/spec/support/v5.0/typed-override.yaml +0 -2
- data/spec/support/v5.1/typed-override.yaml +0 -2
- data/spec/support/v5.2/typed-override.yaml +0 -2
- data/spec/support/v6.0/typed-override.yaml +0 -2
@@ -0,0 +1,113 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# This is an autogenerated file for Rails' ActiveRecord.
|
3
|
+
# Please rerun bundle exec rake rails_rbi:active_record to regenerate.
|
4
|
+
class ActiveRecord::Base
|
5
|
+
sig { params(args: T.untyped).returns(T.attached_class) }
|
6
|
+
def self.find(*args); end
|
7
|
+
|
8
|
+
sig { params(args: T.untyped).returns(T.nilable(T.attached_class)) }
|
9
|
+
def self.find_by(*args); end
|
10
|
+
|
11
|
+
sig { params(args: T.untyped).returns(T.attached_class) }
|
12
|
+
def self.find_by!(*args); end
|
13
|
+
|
14
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
15
|
+
def self.find_or_initialize_by(attributes, &block); end
|
16
|
+
|
17
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
18
|
+
def self.find_or_create_by(attributes, &block); end
|
19
|
+
|
20
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
21
|
+
def self.find_or_create_by!(attributes, &block); end
|
22
|
+
|
23
|
+
sig { returns(T.nilable(T.attached_class)) }
|
24
|
+
def self.first; end
|
25
|
+
|
26
|
+
sig { returns(T.attached_class) }
|
27
|
+
def self.first!; end
|
28
|
+
|
29
|
+
sig { returns(T.nilable(T.attached_class)) }
|
30
|
+
def self.second; end
|
31
|
+
|
32
|
+
sig { returns(T.attached_class) }
|
33
|
+
def self.second!; end
|
34
|
+
|
35
|
+
sig { returns(T.nilable(T.attached_class)) }
|
36
|
+
def self.third; end
|
37
|
+
|
38
|
+
sig { returns(T.attached_class) }
|
39
|
+
def self.third!; end
|
40
|
+
|
41
|
+
sig { returns(T.nilable(T.attached_class)) }
|
42
|
+
def self.third_to_last; end
|
43
|
+
|
44
|
+
sig { returns(T.attached_class) }
|
45
|
+
def self.third_to_last!; end
|
46
|
+
|
47
|
+
sig { returns(T.nilable(T.attached_class)) }
|
48
|
+
def self.second_to_last; end
|
49
|
+
|
50
|
+
sig { returns(T.attached_class) }
|
51
|
+
def self.second_to_last!; end
|
52
|
+
|
53
|
+
sig { returns(T.nilable(T.attached_class)) }
|
54
|
+
def self.last; end
|
55
|
+
|
56
|
+
sig { returns(T.attached_class) }
|
57
|
+
def self.last!; end
|
58
|
+
|
59
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
60
|
+
def self.create(attributes = nil, &block); end
|
61
|
+
|
62
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
63
|
+
def self.create!(attributes = nil, &block); end
|
64
|
+
|
65
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
66
|
+
def self.new(attributes = nil, &block); end
|
67
|
+
|
68
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
69
|
+
def self.first_or_create(attributes = nil, &block); end
|
70
|
+
|
71
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
72
|
+
def self.first_or_create!(attributes = nil, &block); end
|
73
|
+
|
74
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
75
|
+
def self.first_or_initialize(attributes = nil, &block); end
|
76
|
+
|
77
|
+
sig do
|
78
|
+
params(
|
79
|
+
start: T.nilable(Integer),
|
80
|
+
finish: T.nilable(Integer),
|
81
|
+
batch_size: T.nilable(Integer),
|
82
|
+
error_on_ignore: T.nilable(T::Boolean),
|
83
|
+
block: T.nilable(T.proc.params(e: T.attached_class).void)
|
84
|
+
).returns(T::Enumerator[T.attached_class])
|
85
|
+
end
|
86
|
+
def self.find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
87
|
+
|
88
|
+
sig do
|
89
|
+
params(
|
90
|
+
start: T.nilable(Integer),
|
91
|
+
finish: T.nilable(Integer),
|
92
|
+
batch_size: T.nilable(Integer),
|
93
|
+
error_on_ignore: T.nilable(T::Boolean),
|
94
|
+
block: T.nilable(T.proc.params(e: T::Array[T.attached_class]).void)
|
95
|
+
).returns(T::Enumerator[T::Array[T.attached_class]])
|
96
|
+
end
|
97
|
+
def self.find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
98
|
+
|
99
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
100
|
+
def self.exists?(conditions = nil); end
|
101
|
+
|
102
|
+
sig { returns(T::Boolean) }
|
103
|
+
def self.any?; end
|
104
|
+
|
105
|
+
sig { returns(T::Boolean) }
|
106
|
+
def self.many?; end
|
107
|
+
|
108
|
+
sig { returns(T::Boolean) }
|
109
|
+
def self.none?; end
|
110
|
+
|
111
|
+
sig { returns(T::Boolean) }
|
112
|
+
def self.one?; end
|
113
|
+
end
|
@@ -0,0 +1,175 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# This is an autogenerated file for Rails' ActiveRecord.
|
3
|
+
# Please rerun bundle exec rake rails_rbi:active_record to regenerate.
|
4
|
+
class ActiveRecord::Relation
|
5
|
+
include Enumerable
|
6
|
+
Elem = type_member(fixed: T.untyped)
|
7
|
+
|
8
|
+
sig { params(args: T.untyped).returns(Elem) }
|
9
|
+
def find(*args); end
|
10
|
+
|
11
|
+
sig { params(args: T.untyped).returns(T.nilable(Elem)) }
|
12
|
+
def find_by(*args); end
|
13
|
+
|
14
|
+
sig { params(args: T.untyped).returns(Elem) }
|
15
|
+
def find_by!(*args); end
|
16
|
+
|
17
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
18
|
+
def find_or_initialize_by(attributes, &block); end
|
19
|
+
|
20
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
21
|
+
def find_or_create_by(attributes, &block); end
|
22
|
+
|
23
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
24
|
+
def find_or_create_by!(attributes, &block); end
|
25
|
+
|
26
|
+
sig { returns(T.nilable(Elem)) }
|
27
|
+
def first; end
|
28
|
+
|
29
|
+
sig { returns(Elem) }
|
30
|
+
def first!; end
|
31
|
+
|
32
|
+
sig { returns(T.nilable(Elem)) }
|
33
|
+
def second; end
|
34
|
+
|
35
|
+
sig { returns(Elem) }
|
36
|
+
def second!; end
|
37
|
+
|
38
|
+
sig { returns(T.nilable(Elem)) }
|
39
|
+
def third; end
|
40
|
+
|
41
|
+
sig { returns(Elem) }
|
42
|
+
def third!; end
|
43
|
+
|
44
|
+
sig { returns(T.nilable(Elem)) }
|
45
|
+
def third_to_last; end
|
46
|
+
|
47
|
+
sig { returns(Elem) }
|
48
|
+
def third_to_last!; end
|
49
|
+
|
50
|
+
sig { returns(T.nilable(Elem)) }
|
51
|
+
def second_to_last; end
|
52
|
+
|
53
|
+
sig { returns(Elem) }
|
54
|
+
def second_to_last!; end
|
55
|
+
|
56
|
+
sig { returns(T.nilable(Elem)) }
|
57
|
+
def last; end
|
58
|
+
|
59
|
+
sig { returns(Elem) }
|
60
|
+
def last!; end
|
61
|
+
|
62
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
63
|
+
def create(attributes = nil, &block); end
|
64
|
+
|
65
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
66
|
+
def create!(attributes = nil, &block); end
|
67
|
+
|
68
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
69
|
+
def new(attributes = nil, &block); end
|
70
|
+
|
71
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
72
|
+
def build(attributes = nil, &block); end
|
73
|
+
|
74
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
75
|
+
def first_or_create(attributes = nil, &block); end
|
76
|
+
|
77
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
78
|
+
def first_or_create!(attributes = nil, &block); end
|
79
|
+
|
80
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
81
|
+
def first_or_initialize(attributes = nil, &block); end
|
82
|
+
|
83
|
+
sig do
|
84
|
+
params(
|
85
|
+
start: T.nilable(Integer),
|
86
|
+
finish: T.nilable(Integer),
|
87
|
+
batch_size: T.nilable(Integer),
|
88
|
+
error_on_ignore: T.nilable(T::Boolean),
|
89
|
+
block: T.nilable(T.proc.params(e: Elem).void)
|
90
|
+
).returns(T::Enumerator[Elem])
|
91
|
+
end
|
92
|
+
def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
93
|
+
|
94
|
+
sig do
|
95
|
+
params(
|
96
|
+
start: T.nilable(Integer),
|
97
|
+
finish: T.nilable(Integer),
|
98
|
+
batch_size: T.nilable(Integer),
|
99
|
+
error_on_ignore: T.nilable(T::Boolean),
|
100
|
+
block: T.nilable(T.proc.params(e: T::Array[Elem]).void)
|
101
|
+
).returns(T::Enumerator[T::Array[Elem]])
|
102
|
+
end
|
103
|
+
def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
104
|
+
|
105
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
106
|
+
def exists?(conditions = nil); end
|
107
|
+
|
108
|
+
sig { returns(T::Boolean) }
|
109
|
+
def any?; end
|
110
|
+
|
111
|
+
sig { returns(T::Boolean) }
|
112
|
+
def many?; end
|
113
|
+
|
114
|
+
sig { returns(T::Boolean) }
|
115
|
+
def none?; end
|
116
|
+
|
117
|
+
sig { returns(T::Boolean) }
|
118
|
+
def one?; end
|
119
|
+
|
120
|
+
sig { override.params(block: T.proc.params(e: Elem).void).returns(T::Array[Elem]) }
|
121
|
+
def each(&block); end
|
122
|
+
|
123
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[Elem]) }
|
124
|
+
def flatten(level); end
|
125
|
+
|
126
|
+
sig { returns(T::Array[Elem]) }
|
127
|
+
def to_a; end
|
128
|
+
|
129
|
+
sig { type_parameters(:U).params(blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U))).returns(T::Array[T.type_parameter(:U)]) }
|
130
|
+
def map(&blk); end
|
131
|
+
|
132
|
+
sig { returns(T::Boolean) }
|
133
|
+
def empty?; end
|
134
|
+
end
|
135
|
+
|
136
|
+
class ActiveRecord::AssociationRelation < ActiveRecord::Relation
|
137
|
+
Elem = type_member(fixed: T.untyped)
|
138
|
+
|
139
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
140
|
+
def new(attributes = nil, &block); end
|
141
|
+
|
142
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
143
|
+
def build(attributes = nil, &block); end
|
144
|
+
|
145
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
146
|
+
def create(attributes = nil, &block); end
|
147
|
+
|
148
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
149
|
+
def create!(attributes = nil, &block); end
|
150
|
+
end
|
151
|
+
|
152
|
+
class ActiveRecord::Associations::CollectionProxy < ActiveRecord::Relation
|
153
|
+
Elem = type_member(fixed: T.untyped)
|
154
|
+
|
155
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
156
|
+
def new(attributes = nil, &block); end
|
157
|
+
|
158
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
159
|
+
def build(attributes = nil, &block); end
|
160
|
+
|
161
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
162
|
+
def create(attributes = nil, &block); end
|
163
|
+
|
164
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
165
|
+
def create!(attributes = nil, &block); end
|
166
|
+
|
167
|
+
sig { params(args: T.untyped).returns(Elem) }
|
168
|
+
def find(*args); end
|
169
|
+
|
170
|
+
sig { params(limit: T.untyped).returns(T.nilable(Elem)) }
|
171
|
+
def last(limit = nil); end
|
172
|
+
|
173
|
+
sig { returns(T::Boolean) }
|
174
|
+
def empty?; end
|
175
|
+
end
|
@@ -8,8 +8,6 @@ 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
|
|
@@ -43,136 +41,11 @@ end
|
|
43
41
|
class ActiveStorage::Attachment < ActiveRecord::Base
|
44
42
|
include ActiveStorage::Attachment::GeneratedAssociationMethods
|
45
43
|
extend ActiveStorage::Attachment::CustomFinderMethods
|
46
|
-
extend
|
47
|
-
extend T::Generic
|
44
|
+
extend ActiveStorage::Attachment::QueryMethodsReturningRelation
|
48
45
|
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.reselect(*args); end
|
61
|
-
|
62
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
63
|
-
def self.order(*args); end
|
64
|
-
|
65
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
66
|
-
def self.reorder(*args); end
|
67
|
-
|
68
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
69
|
-
def self.group(*args); end
|
70
|
-
|
71
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
72
|
-
def self.limit(*args); end
|
73
|
-
|
74
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
75
|
-
def self.offset(*args); end
|
76
|
-
|
77
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
78
|
-
def self.joins(*args); end
|
79
|
-
|
80
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
81
|
-
def self.left_joins(*args); end
|
82
|
-
|
83
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
84
|
-
def self.left_outer_joins(*args); end
|
85
|
-
|
86
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
87
|
-
def self.where(*args); end
|
88
|
-
|
89
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
90
|
-
def self.rewhere(*args); end
|
91
|
-
|
92
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
93
|
-
def self.preload(*args); end
|
94
|
-
|
95
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
96
|
-
def self.extract_associated(*args); end
|
97
|
-
|
98
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
99
|
-
def self.eager_load(*args); end
|
100
|
-
|
101
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
102
|
-
def self.includes(*args); end
|
103
|
-
|
104
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
105
|
-
def self.from(*args); end
|
106
|
-
|
107
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
108
|
-
def self.lock(*args); end
|
109
|
-
|
110
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
111
|
-
def self.readonly(*args); end
|
112
|
-
|
113
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
114
|
-
def self.or(*args); end
|
115
|
-
|
116
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
117
|
-
def self.having(*args); end
|
118
|
-
|
119
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
120
|
-
def self.create_with(*args); end
|
121
|
-
|
122
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
123
|
-
def self.distinct(*args); end
|
124
|
-
|
125
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
126
|
-
def self.references(*args); end
|
127
|
-
|
128
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
129
|
-
def self.none(*args); end
|
130
|
-
|
131
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
132
|
-
def self.unscope(*args); end
|
133
|
-
|
134
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
135
|
-
def self.optimizer_hints(*args); end
|
136
|
-
|
137
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
138
|
-
def self.merge(*args); end
|
139
|
-
|
140
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
141
|
-
def self.except(*args); end
|
142
|
-
|
143
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
144
|
-
def self.only(*args); end
|
145
|
-
|
146
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
147
|
-
def self.extending(*args, &block); end
|
148
|
-
|
149
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
150
|
-
def self.exists?(conditions = nil); end
|
151
|
-
|
152
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
153
|
-
def self.any?(*args); end
|
154
|
-
|
155
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
156
|
-
def self.many?(*args); end
|
157
|
-
|
158
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
159
|
-
def self.none?(*args); end
|
160
|
-
|
161
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
162
|
-
def self.one?(*args); end
|
163
|
-
|
164
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
165
|
-
def self.empty?(*args); end
|
166
46
|
end
|
167
47
|
|
168
|
-
|
169
|
-
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
170
|
-
include ActiveStorage::Attachment::CustomFinderMethods
|
171
|
-
include Enumerable
|
172
|
-
extend T::Sig
|
173
|
-
extend T::Generic
|
174
|
-
Elem = type_member(fixed: ActiveStorage::Attachment)
|
175
|
-
|
48
|
+
module ActiveStorage::Attachment::QueryMethodsReturningRelation
|
176
49
|
sig { returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
177
50
|
def all; end
|
178
51
|
|
@@ -272,37 +145,24 @@ class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
|
|
272
145
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
273
146
|
def extending(*args, &block); end
|
274
147
|
|
275
|
-
sig
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
def
|
286
|
-
|
287
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
288
|
-
def one?(*args); end
|
289
|
-
|
290
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
291
|
-
def empty?(*args); end
|
148
|
+
sig do
|
149
|
+
params(
|
150
|
+
of: T.nilable(Integer),
|
151
|
+
start: T.nilable(Integer),
|
152
|
+
finish: T.nilable(Integer),
|
153
|
+
load: T.nilable(T::Boolean),
|
154
|
+
error_on_ignore: T.nilable(T::Boolean),
|
155
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Attachment::ActiveRecord_Relation).void)
|
156
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
157
|
+
end
|
158
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
292
159
|
end
|
293
160
|
|
294
|
-
|
295
|
-
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
296
|
-
include ActiveStorage::Attachment::CustomFinderMethods
|
297
|
-
include Enumerable
|
298
|
-
extend T::Sig
|
299
|
-
extend T::Generic
|
300
|
-
Elem = type_member(fixed: ActiveStorage::Attachment)
|
301
|
-
|
161
|
+
module ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
302
162
|
sig { returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
303
163
|
def all; end
|
304
164
|
|
305
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::
|
165
|
+
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
306
166
|
def unscoped(&block); end
|
307
167
|
|
308
168
|
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
@@ -398,290 +258,37 @@ class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord
|
|
398
258
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
399
259
|
def extending(*args, &block); end
|
400
260
|
|
401
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment) }
|
402
|
-
def find(*args); end
|
403
|
-
|
404
|
-
sig { params(args: T.untyped).returns(T.nilable(ActiveStorage::Attachment)) }
|
405
|
-
def find_by(*args); end
|
406
|
-
|
407
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment) }
|
408
|
-
def find_by!(*args); end
|
409
|
-
|
410
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveStorage::Attachment).void)).returns(ActiveStorage::Attachment) }
|
411
|
-
def find_or_initialize_by(attributes, &block); end
|
412
|
-
|
413
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveStorage::Attachment).void)).returns(ActiveStorage::Attachment) }
|
414
|
-
def find_or_create_by(attributes, &block); end
|
415
|
-
|
416
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveStorage::Attachment).void)).returns(ActiveStorage::Attachment) }
|
417
|
-
def find_or_create_by!(attributes, &block); end
|
418
|
-
|
419
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
420
|
-
def first; end
|
421
|
-
|
422
|
-
sig { returns(ActiveStorage::Attachment) }
|
423
|
-
def first!; end
|
424
|
-
|
425
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
426
|
-
def second; end
|
427
|
-
|
428
|
-
sig { returns(ActiveStorage::Attachment) }
|
429
|
-
def second!; end
|
430
|
-
|
431
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
432
|
-
def third; end
|
433
|
-
|
434
|
-
sig { returns(ActiveStorage::Attachment) }
|
435
|
-
def third!; end
|
436
|
-
|
437
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
438
|
-
def third_to_last; end
|
439
|
-
|
440
|
-
sig { returns(ActiveStorage::Attachment) }
|
441
|
-
def third_to_last!; end
|
442
|
-
|
443
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
444
|
-
def second_to_last; end
|
445
|
-
|
446
|
-
sig { returns(ActiveStorage::Attachment) }
|
447
|
-
def second_to_last!; end
|
448
|
-
|
449
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
450
|
-
def last; end
|
451
|
-
|
452
|
-
sig { returns(ActiveStorage::Attachment) }
|
453
|
-
def last!; end
|
454
|
-
|
455
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
456
|
-
def exists?(conditions = nil); end
|
457
|
-
|
458
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
459
|
-
def any?(*args); end
|
460
|
-
|
461
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
462
|
-
def many?(*args); end
|
463
|
-
|
464
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
465
|
-
def none?(*args); end
|
466
|
-
|
467
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
468
|
-
def one?(*args); end
|
469
|
-
|
470
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
471
|
-
def empty?(*args); end
|
472
|
-
|
473
|
-
sig { override.params(block: T.proc.params(e: ActiveStorage::Attachment).void).returns(T::Array[ActiveStorage::Attachment]) }
|
474
|
-
def each(&block); end
|
475
|
-
|
476
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveStorage::Attachment]) }
|
477
|
-
def flatten(level); end
|
478
|
-
|
479
|
-
sig { returns(T::Array[ActiveStorage::Attachment]) }
|
480
|
-
def to_a; end
|
481
|
-
|
482
261
|
sig do
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
262
|
+
params(
|
263
|
+
of: T.nilable(Integer),
|
264
|
+
start: T.nilable(Integer),
|
265
|
+
finish: T.nilable(Integer),
|
266
|
+
load: T.nilable(T::Boolean),
|
267
|
+
error_on_ignore: T.nilable(T::Boolean),
|
268
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Attachment::ActiveRecord_AssociationRelation).void)
|
269
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
487
270
|
end
|
488
|
-
def
|
271
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
489
272
|
end
|
490
273
|
|
491
|
-
class ActiveStorage::Attachment::
|
274
|
+
class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
|
275
|
+
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
492
276
|
include ActiveStorage::Attachment::CustomFinderMethods
|
493
|
-
include
|
494
|
-
extend T::Sig
|
495
|
-
extend T::Generic
|
277
|
+
include ActiveStorage::Attachment::QueryMethodsReturningRelation
|
496
278
|
Elem = type_member(fixed: ActiveStorage::Attachment)
|
279
|
+
end
|
497
280
|
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
505
|
-
def select(*args); end
|
506
|
-
|
507
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
508
|
-
def reselect(*args); end
|
509
|
-
|
510
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
511
|
-
def order(*args); end
|
512
|
-
|
513
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
514
|
-
def reorder(*args); end
|
515
|
-
|
516
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
517
|
-
def group(*args); end
|
518
|
-
|
519
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
520
|
-
def limit(*args); end
|
521
|
-
|
522
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
523
|
-
def offset(*args); end
|
524
|
-
|
525
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
526
|
-
def joins(*args); end
|
527
|
-
|
528
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
529
|
-
def left_joins(*args); end
|
530
|
-
|
531
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
532
|
-
def left_outer_joins(*args); end
|
533
|
-
|
534
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
535
|
-
def where(*args); end
|
536
|
-
|
537
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
538
|
-
def rewhere(*args); end
|
539
|
-
|
540
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
541
|
-
def preload(*args); end
|
542
|
-
|
543
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
544
|
-
def extract_associated(*args); end
|
545
|
-
|
546
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
547
|
-
def eager_load(*args); end
|
548
|
-
|
549
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
550
|
-
def includes(*args); end
|
551
|
-
|
552
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
553
|
-
def from(*args); end
|
554
|
-
|
555
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
556
|
-
def lock(*args); end
|
557
|
-
|
558
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
559
|
-
def readonly(*args); end
|
560
|
-
|
561
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
562
|
-
def or(*args); end
|
563
|
-
|
564
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
565
|
-
def having(*args); end
|
566
|
-
|
567
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
568
|
-
def create_with(*args); end
|
569
|
-
|
570
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
571
|
-
def distinct(*args); end
|
572
|
-
|
573
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
574
|
-
def references(*args); end
|
575
|
-
|
576
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
577
|
-
def none(*args); end
|
578
|
-
|
579
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
580
|
-
def unscope(*args); end
|
581
|
-
|
582
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
583
|
-
def optimizer_hints(*args); end
|
584
|
-
|
585
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
586
|
-
def merge(*args); end
|
587
|
-
|
588
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
589
|
-
def except(*args); end
|
590
|
-
|
591
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
592
|
-
def only(*args); end
|
593
|
-
|
594
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
595
|
-
def extending(*args, &block); end
|
596
|
-
|
597
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment) }
|
598
|
-
def find(*args); end
|
599
|
-
|
600
|
-
sig { params(args: T.untyped).returns(T.nilable(ActiveStorage::Attachment)) }
|
601
|
-
def find_by(*args); end
|
602
|
-
|
603
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment) }
|
604
|
-
def find_by!(*args); end
|
605
|
-
|
606
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveStorage::Attachment).void)).returns(ActiveStorage::Attachment) }
|
607
|
-
def find_or_initialize_by(attributes, &block); end
|
608
|
-
|
609
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveStorage::Attachment).void)).returns(ActiveStorage::Attachment) }
|
610
|
-
def find_or_create_by(attributes, &block); end
|
611
|
-
|
612
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveStorage::Attachment).void)).returns(ActiveStorage::Attachment) }
|
613
|
-
def find_or_create_by!(attributes, &block); end
|
614
|
-
|
615
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
616
|
-
def first; end
|
617
|
-
|
618
|
-
sig { returns(ActiveStorage::Attachment) }
|
619
|
-
def first!; end
|
620
|
-
|
621
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
622
|
-
def second; end
|
623
|
-
|
624
|
-
sig { returns(ActiveStorage::Attachment) }
|
625
|
-
def second!; end
|
626
|
-
|
627
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
628
|
-
def third; end
|
629
|
-
|
630
|
-
sig { returns(ActiveStorage::Attachment) }
|
631
|
-
def third!; end
|
632
|
-
|
633
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
634
|
-
def third_to_last; end
|
635
|
-
|
636
|
-
sig { returns(ActiveStorage::Attachment) }
|
637
|
-
def third_to_last!; end
|
638
|
-
|
639
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
640
|
-
def second_to_last; end
|
641
|
-
|
642
|
-
sig { returns(ActiveStorage::Attachment) }
|
643
|
-
def second_to_last!; end
|
644
|
-
|
645
|
-
sig { returns(T.nilable(ActiveStorage::Attachment)) }
|
646
|
-
def last; end
|
647
|
-
|
648
|
-
sig { returns(ActiveStorage::Attachment) }
|
649
|
-
def last!; end
|
650
|
-
|
651
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
652
|
-
def exists?(conditions = nil); end
|
653
|
-
|
654
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
655
|
-
def any?(*args); end
|
656
|
-
|
657
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
658
|
-
def many?(*args); end
|
659
|
-
|
660
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
661
|
-
def none?(*args); end
|
662
|
-
|
663
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
664
|
-
def one?(*args); end
|
665
|
-
|
666
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
667
|
-
def empty?(*args); end
|
668
|
-
|
669
|
-
sig { override.params(block: T.proc.params(e: ActiveStorage::Attachment).void).returns(T::Array[ActiveStorage::Attachment]) }
|
670
|
-
def each(&block); end
|
671
|
-
|
672
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveStorage::Attachment]) }
|
673
|
-
def flatten(level); end
|
674
|
-
|
675
|
-
sig { returns(T::Array[ActiveStorage::Attachment]) }
|
676
|
-
def to_a; end
|
281
|
+
class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
282
|
+
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
283
|
+
include ActiveStorage::Attachment::CustomFinderMethods
|
284
|
+
include ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
285
|
+
Elem = type_member(fixed: ActiveStorage::Attachment)
|
286
|
+
end
|
677
287
|
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
.returns(T::Array[T.type_parameter(:U)])
|
683
|
-
end
|
684
|
-
def map(&blk); end
|
288
|
+
class ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
289
|
+
include ActiveStorage::Attachment::CustomFinderMethods
|
290
|
+
include ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
291
|
+
Elem = type_member(fixed: ActiveStorage::Attachment)
|
685
292
|
|
686
293
|
sig { params(records: T.any(ActiveStorage::Attachment, T::Array[ActiveStorage::Attachment])).returns(T.self_type) }
|
687
294
|
def <<(*records); end
|