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.
- checksums.yaml +4 -4
- data/.gitattributes +1 -2
- data/.gitignore +2 -1
- data/.travis.yml +3 -1
- data/README.md +54 -7
- data/Rakefile +3 -3
- data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
- data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +1 -3
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +8 -2
- data/lib/sorbet-rails/config.rb +11 -0
- data/lib/sorbet-rails/deprecation.rb +1 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
- data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
- data/lib/sorbet-rails/model_column_utils.rb +129 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +37 -3
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -103
- 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 +0 -9
- data/lib/sorbet-rails/model_rbi_formatter.rb +4 -8
- data/lib/sorbet-rails/model_utils.rb +73 -32
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/sorbet_utils.rb +152 -150
- data/lib/sorbet-rails/tasks/rails_rbi.rake +18 -26
- data/sorbet-rails.gemspec +1 -1
- data/spec/generators/rails-template.rb +3 -6
- data/spec/generators/sorbet_test_cases.rb +66 -88
- data/spec/job_rbi_formatter_spec.rb +1 -1
- data/spec/pluck_to_tstruct_spec.rb +74 -1
- data/spec/rails_helper.rb +2 -2
- data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
- data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
- data/spec/support/v5.0/Gemfile +1 -1
- data/spec/support/v5.0/Gemfile.lock +9 -9
- data/spec/support/v5.0/app/models/spell_book.rb +2 -0
- data/spec/support/v5.0/app/models/wizard.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.1/Gemfile.lock +7 -7
- data/spec/support/v5.1/app/models/spell_book.rb +2 -0
- data/spec/support/v5.1/app/models/wizard.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +66 -88
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/spell_book.rb +2 -0
- data/spec/support/v5.2/app/models/wizard.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/.gitignore +6 -0
- data/spec/support/v6.0/Gemfile +3 -3
- data/spec/support/v6.0/Gemfile.lock +77 -76
- data/spec/support/v6.0/app/models/spell_book.rb +2 -0
- data/spec/support/v6.0/app/models/wizard.rb +1 -1
- data/spec/support/v6.0/bin/bundle +22 -13
- data/spec/support/v6.0/config/environments/test.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +66 -88
- data/spec/support/v6.0/tmp/pids/.keep +0 -0
- data/spec/test_data/v5.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +60 -190
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +42 -188
- data/spec/test_data/v5.0/expected_potion.rbi +51 -188
- data/spec/test_data/v5.0/expected_robe.rbi +51 -190
- data/spec/test_data/v5.0/expected_schema_migration.rbi +42 -188
- data/spec/test_data/v5.0/expected_school.rbi +51 -190
- data/spec/test_data/v5.0/expected_spell.rbi +42 -190
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +60 -190
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -215
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +60 -190
- data/spec/test_data/v5.0/expected_squib.rbi +131 -263
- data/spec/test_data/v5.0/expected_subject.rbi +42 -190
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +60 -190
- data/spec/test_data/v5.0/expected_wand.rbi +84 -225
- data/spec/test_data/v5.0/expected_wizard.rbi +131 -263
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +60 -190
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +131 -263
- data/spec/test_data/v5.1/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.1/expected_potion.rbi +51 -194
- data/spec/test_data/v5.1/expected_robe.rbi +51 -196
- data/spec/test_data/v5.1/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.1/expected_school.rbi +51 -196
- data/spec/test_data/v5.1/expected_spell.rbi +42 -196
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.1/expected_squib.rbi +132 -270
- data/spec/test_data/v5.1/expected_subject.rbi +42 -196
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.1/expected_wand.rbi +84 -231
- data/spec/test_data/v5.1/expected_wizard.rbi +132 -270
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +132 -270
- data/spec/test_data/v5.2/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +2 -2
- data/spec/test_data/v5.2/expected_attachment.rbi +60 -194
- data/spec/test_data/v5.2/expected_blob.rbi +80 -214
- data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +60 -196
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +42 -194
- data/spec/test_data/v5.2/expected_potion.rbi +51 -194
- data/spec/test_data/v5.2/expected_robe.rbi +51 -196
- data/spec/test_data/v5.2/expected_schema_migration.rbi +42 -194
- data/spec/test_data/v5.2/expected_school.rbi +51 -196
- data/spec/test_data/v5.2/expected_spell.rbi +42 -196
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +60 -196
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -221
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +60 -196
- data/spec/test_data/v5.2/expected_squib.rbi +156 -276
- data/spec/test_data/v5.2/expected_subject.rbi +42 -196
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +60 -196
- data/spec/test_data/v5.2/expected_wand.rbi +84 -231
- data/spec/test_data/v5.2/expected_wizard.rbi +156 -276
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +60 -196
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +156 -276
- data/spec/test_data/v6.0/expected_active_record_base.rbi +2 -2
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
- data/spec/test_data/v6.0/expected_attachment.rbi +60 -218
- data/spec/test_data/v6.0/expected_blob.rbi +80 -238
- data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
- data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
- data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
- data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +60 -220
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +42 -218
- data/spec/test_data/v6.0/expected_potion.rbi +51 -218
- data/spec/test_data/v6.0/expected_robe.rbi +51 -220
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +42 -218
- data/spec/test_data/v6.0/expected_school.rbi +51 -220
- data/spec/test_data/v6.0/expected_spell.rbi +42 -220
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +60 -220
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -257
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +60 -220
- data/spec/test_data/v6.0/expected_squib.rbi +182 -326
- data/spec/test_data/v6.0/expected_subject.rbi +42 -220
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +60 -220
- data/spec/test_data/v6.0/expected_wand.rbi +100 -271
- data/spec/test_data/v6.0/expected_wizard.rbi +182 -326
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +60 -220
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +182 -326
- metadata +46 -11
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -42
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -45
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -57
- 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
@@ -75,7 +75,7 @@ class ActiveRecord::Base
|
|
75
75
|
def self.first_or_initialize(attributes = nil, &block); end
|
76
76
|
|
77
77
|
sig do
|
78
|
-
|
78
|
+
params(
|
79
79
|
start: T.nilable(Integer),
|
80
80
|
finish: T.nilable(Integer),
|
81
81
|
batch_size: T.nilable(Integer),
|
@@ -86,7 +86,7 @@ class ActiveRecord::Base
|
|
86
86
|
def self.find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
87
87
|
|
88
88
|
sig do
|
89
|
-
|
89
|
+
params(
|
90
90
|
start: T.nilable(Integer),
|
91
91
|
finish: T.nilable(Integer),
|
92
92
|
batch_size: T.nilable(Integer),
|
@@ -81,7 +81,7 @@ class ActiveRecord::Relation
|
|
81
81
|
def first_or_initialize(attributes = nil, &block); end
|
82
82
|
|
83
83
|
sig do
|
84
|
-
|
84
|
+
params(
|
85
85
|
start: T.nilable(Integer),
|
86
86
|
finish: T.nilable(Integer),
|
87
87
|
batch_size: T.nilable(Integer),
|
@@ -92,7 +92,7 @@ class ActiveRecord::Relation
|
|
92
92
|
def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
93
93
|
|
94
94
|
sig do
|
95
|
-
|
95
|
+
params(
|
96
96
|
start: T.nilable(Integer),
|
97
97
|
finish: T.nilable(Integer),
|
98
98
|
batch_size: T.nilable(Integer),
|
@@ -136,17 +136,17 @@ end
|
|
136
136
|
class ActiveRecord::AssociationRelation < ActiveRecord::Relation
|
137
137
|
Elem = type_member(fixed: T.untyped)
|
138
138
|
|
139
|
-
sig { params(
|
140
|
-
def new(
|
139
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
140
|
+
def new(attributes = nil, &block); end
|
141
141
|
|
142
|
-
sig { params(
|
143
|
-
def build(
|
142
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
143
|
+
def build(attributes = nil, &block); end
|
144
144
|
|
145
|
-
sig { params(
|
146
|
-
def create(
|
145
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
146
|
+
def create(attributes = nil, &block); end
|
147
147
|
|
148
|
-
sig { params(
|
149
|
-
def create!(
|
148
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
149
|
+
def create!(attributes = nil, &block); end
|
150
150
|
end
|
151
151
|
|
152
152
|
class ActiveRecord::Associations::CollectionProxy < ActiveRecord::Relation
|
@@ -8,17 +8,33 @@ module ActiveStorage::Attachment::ActiveRelation_WhereNot
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module ActiveStorage::Attachment::GeneratedAssociationMethods
|
11
|
-
extend T::Sig
|
12
|
-
|
13
11
|
sig { returns(::ActiveStorage::Blob) }
|
14
12
|
def blob; end
|
15
13
|
|
14
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
15
|
+
def build_blob(*args, &block); end
|
16
|
+
|
17
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
18
|
+
def create_blob(*args, &block); end
|
19
|
+
|
20
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
21
|
+
def create_blob!(*args, &block); end
|
22
|
+
|
16
23
|
sig { params(value: ::ActiveStorage::Blob).void }
|
17
24
|
def blob=(value); end
|
18
25
|
|
19
26
|
sig { returns(T.untyped) }
|
20
27
|
def record; end
|
21
28
|
|
29
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
|
30
|
+
def build_record(*args, &block); end
|
31
|
+
|
32
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
|
33
|
+
def create_record(*args, &block); end
|
34
|
+
|
35
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) }
|
36
|
+
def create_record!(*args, &block); end
|
37
|
+
|
22
38
|
sig { params(value: T.untyped).void }
|
23
39
|
def record=(value); end
|
24
40
|
end
|
@@ -43,117 +59,11 @@ end
|
|
43
59
|
class ActiveStorage::Attachment < ActiveRecord::Base
|
44
60
|
include ActiveStorage::Attachment::GeneratedAssociationMethods
|
45
61
|
extend ActiveStorage::Attachment::CustomFinderMethods
|
46
|
-
extend
|
47
|
-
extend T::Generic
|
62
|
+
extend ActiveStorage::Attachment::QueryMethodsReturningRelation
|
48
63
|
RelationType = T.type_alias { T.any(ActiveStorage::Attachment::ActiveRecord_Relation, ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy, ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
49
|
-
|
50
|
-
sig { returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
51
|
-
def self.all; end
|
52
|
-
|
53
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
54
|
-
def self.unscoped(&block); end
|
55
|
-
|
56
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
57
|
-
def self.select(*args); end
|
58
|
-
|
59
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
60
|
-
def self.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
64
|
end
|
149
65
|
|
150
|
-
|
151
|
-
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
152
|
-
include ActiveStorage::Attachment::CustomFinderMethods
|
153
|
-
extend T::Sig
|
154
|
-
extend T::Generic
|
155
|
-
Elem = type_member(fixed: ActiveStorage::Attachment)
|
156
|
-
|
66
|
+
module ActiveStorage::Attachment::QueryMethodsReturningRelation
|
157
67
|
sig { returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
158
68
|
def all; end
|
159
69
|
|
@@ -252,19 +162,25 @@ class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
|
|
252
162
|
|
253
163
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
254
164
|
def extending(*args, &block); end
|
255
|
-
end
|
256
165
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
166
|
+
sig do
|
167
|
+
params(
|
168
|
+
of: T.nilable(Integer),
|
169
|
+
start: T.nilable(Integer),
|
170
|
+
finish: T.nilable(Integer),
|
171
|
+
load: T.nilable(T::Boolean),
|
172
|
+
error_on_ignore: T.nilable(T::Boolean),
|
173
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Attachment::ActiveRecord_Relation).void)
|
174
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
175
|
+
end
|
176
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
177
|
+
end
|
263
178
|
|
179
|
+
module ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
264
180
|
sig { returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
265
181
|
def all; end
|
266
182
|
|
267
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::
|
183
|
+
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_Relation) }
|
268
184
|
def unscoped(&block); end
|
269
185
|
|
270
186
|
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
@@ -359,112 +275,38 @@ class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord
|
|
359
275
|
|
360
276
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
361
277
|
def extending(*args, &block); end
|
278
|
+
|
279
|
+
sig do
|
280
|
+
params(
|
281
|
+
of: T.nilable(Integer),
|
282
|
+
start: T.nilable(Integer),
|
283
|
+
finish: T.nilable(Integer),
|
284
|
+
load: T.nilable(T::Boolean),
|
285
|
+
error_on_ignore: T.nilable(T::Boolean),
|
286
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Attachment::ActiveRecord_AssociationRelation).void)
|
287
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
288
|
+
end
|
289
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
362
290
|
end
|
363
291
|
|
364
|
-
class ActiveStorage::Attachment::
|
292
|
+
class ActiveStorage::Attachment::ActiveRecord_Relation < ActiveRecord::Relation
|
293
|
+
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
365
294
|
include ActiveStorage::Attachment::CustomFinderMethods
|
366
|
-
|
367
|
-
extend T::Generic
|
295
|
+
include ActiveStorage::Attachment::QueryMethodsReturningRelation
|
368
296
|
Elem = type_member(fixed: ActiveStorage::Attachment)
|
297
|
+
end
|
369
298
|
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
377
|
-
def select(*args); end
|
378
|
-
|
379
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
380
|
-
def reselect(*args); end
|
381
|
-
|
382
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
383
|
-
def order(*args); end
|
384
|
-
|
385
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
386
|
-
def reorder(*args); end
|
387
|
-
|
388
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
389
|
-
def group(*args); end
|
390
|
-
|
391
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
392
|
-
def limit(*args); end
|
393
|
-
|
394
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
395
|
-
def offset(*args); end
|
396
|
-
|
397
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
398
|
-
def joins(*args); end
|
399
|
-
|
400
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
401
|
-
def left_joins(*args); end
|
402
|
-
|
403
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
404
|
-
def left_outer_joins(*args); end
|
405
|
-
|
406
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
407
|
-
def where(*args); end
|
408
|
-
|
409
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
410
|
-
def rewhere(*args); end
|
411
|
-
|
412
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
413
|
-
def preload(*args); end
|
414
|
-
|
415
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
416
|
-
def extract_associated(*args); end
|
417
|
-
|
418
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
419
|
-
def eager_load(*args); end
|
420
|
-
|
421
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
422
|
-
def includes(*args); end
|
423
|
-
|
424
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
425
|
-
def from(*args); end
|
426
|
-
|
427
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
428
|
-
def lock(*args); end
|
429
|
-
|
430
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
431
|
-
def readonly(*args); end
|
432
|
-
|
433
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
434
|
-
def or(*args); end
|
435
|
-
|
436
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
437
|
-
def having(*args); end
|
438
|
-
|
439
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
440
|
-
def create_with(*args); end
|
441
|
-
|
442
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
443
|
-
def distinct(*args); end
|
444
|
-
|
445
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
446
|
-
def references(*args); end
|
447
|
-
|
448
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
449
|
-
def none(*args); end
|
450
|
-
|
451
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
452
|
-
def unscope(*args); end
|
453
|
-
|
454
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
455
|
-
def optimizer_hints(*args); end
|
456
|
-
|
457
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
458
|
-
def merge(*args); end
|
459
|
-
|
460
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
461
|
-
def except(*args); end
|
462
|
-
|
463
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Attachment::ActiveRecord_AssociationRelation) }
|
464
|
-
def only(*args); end
|
299
|
+
class ActiveStorage::Attachment::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
300
|
+
include ActiveStorage::Attachment::ActiveRelation_WhereNot
|
301
|
+
include ActiveStorage::Attachment::CustomFinderMethods
|
302
|
+
include ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
303
|
+
Elem = type_member(fixed: ActiveStorage::Attachment)
|
304
|
+
end
|
465
305
|
|
466
|
-
|
467
|
-
|
306
|
+
class ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
307
|
+
include ActiveStorage::Attachment::CustomFinderMethods
|
308
|
+
include ActiveStorage::Attachment::QueryMethodsReturningAssociationRelation
|
309
|
+
Elem = type_member(fixed: ActiveStorage::Attachment)
|
468
310
|
|
469
311
|
sig { params(records: T.any(ActiveStorage::Attachment, T::Array[ActiveStorage::Attachment])).returns(T.self_type) }
|
470
312
|
def <<(*records); end
|
@@ -27,8 +27,7 @@ end
|
|
27
27
|
class ActiveStorage::Blob < ActiveRecord::Base
|
28
28
|
include ActiveStorage::Blob::GeneratedAssociationMethods
|
29
29
|
extend ActiveStorage::Blob::CustomFinderMethods
|
30
|
-
extend
|
31
|
-
extend T::Generic
|
30
|
+
extend ActiveStorage::Blob::QueryMethodsReturningRelation
|
32
31
|
RelationType = T.type_alias { T.any(ActiveStorage::Blob::ActiveRecord_Relation, ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy, ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
33
32
|
|
34
33
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
@@ -36,120 +35,59 @@ class ActiveStorage::Blob < ActiveRecord::Base
|
|
36
35
|
|
37
36
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
38
37
|
def self.with_attached_preview_image(*args); end
|
38
|
+
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
47
|
-
def self.select(*args); end
|
48
|
-
|
49
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
50
|
-
def self.reselect(*args); end
|
51
|
-
|
52
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
53
|
-
def self.order(*args); end
|
54
|
-
|
55
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
56
|
-
def self.reorder(*args); end
|
57
|
-
|
58
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
59
|
-
def self.group(*args); end
|
60
|
-
|
61
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
62
|
-
def self.limit(*args); end
|
63
|
-
|
64
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
65
|
-
def self.offset(*args); end
|
66
|
-
|
67
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
68
|
-
def self.joins(*args); end
|
69
|
-
|
70
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
71
|
-
def self.left_joins(*args); end
|
72
|
-
|
73
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
74
|
-
def self.left_outer_joins(*args); end
|
75
|
-
|
76
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
77
|
-
def self.where(*args); end
|
78
|
-
|
79
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
80
|
-
def self.rewhere(*args); end
|
81
|
-
|
82
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
83
|
-
def self.preload(*args); end
|
84
|
-
|
85
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
86
|
-
def self.extract_associated(*args); end
|
87
|
-
|
88
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
89
|
-
def self.eager_load(*args); end
|
90
|
-
|
91
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
92
|
-
def self.includes(*args); end
|
93
|
-
|
94
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
95
|
-
def self.from(*args); end
|
96
|
-
|
97
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
98
|
-
def self.lock(*args); end
|
99
|
-
|
100
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
101
|
-
def self.readonly(*args); end
|
102
|
-
|
103
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
104
|
-
def self.or(*args); end
|
105
|
-
|
106
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
107
|
-
def self.having(*args); end
|
108
|
-
|
109
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
110
|
-
def self.create_with(*args); end
|
111
|
-
|
112
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
113
|
-
def self.distinct(*args); end
|
114
|
-
|
115
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
116
|
-
def self.references(*args); end
|
117
|
-
|
118
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
119
|
-
def self.none(*args); end
|
120
|
-
|
121
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
122
|
-
def self.unscope(*args); end
|
40
|
+
class ActiveStorage::Blob::ActiveRecord_Relation < ActiveRecord::Relation
|
41
|
+
include ActiveStorage::Blob::ActiveRelation_WhereNot
|
42
|
+
include ActiveStorage::Blob::CustomFinderMethods
|
43
|
+
include ActiveStorage::Blob::QueryMethodsReturningRelation
|
44
|
+
Elem = type_member(fixed: ActiveStorage::Blob)
|
123
45
|
|
124
46
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
125
|
-
def
|
47
|
+
def unattached(*args); end
|
126
48
|
|
127
49
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
128
|
-
def
|
50
|
+
def with_attached_preview_image(*args); end
|
51
|
+
end
|
129
52
|
|
130
|
-
|
131
|
-
|
53
|
+
class ActiveStorage::Blob::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
54
|
+
include ActiveStorage::Blob::ActiveRelation_WhereNot
|
55
|
+
include ActiveStorage::Blob::CustomFinderMethods
|
56
|
+
include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
57
|
+
Elem = type_member(fixed: ActiveStorage::Blob)
|
132
58
|
|
133
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::
|
134
|
-
def
|
59
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
60
|
+
def unattached(*args); end
|
135
61
|
|
136
|
-
sig { params(args: T.untyped
|
137
|
-
def
|
62
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
63
|
+
def with_attached_preview_image(*args); end
|
138
64
|
end
|
139
65
|
|
140
|
-
class ActiveStorage::Blob::
|
141
|
-
include ActiveStorage::Blob::ActiveRelation_WhereNot
|
66
|
+
class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
142
67
|
include ActiveStorage::Blob::CustomFinderMethods
|
143
|
-
|
144
|
-
extend T::Generic
|
68
|
+
include ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
145
69
|
Elem = type_member(fixed: ActiveStorage::Blob)
|
146
70
|
|
147
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::
|
71
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
148
72
|
def unattached(*args); end
|
149
73
|
|
150
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::
|
74
|
+
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
151
75
|
def with_attached_preview_image(*args); end
|
152
76
|
|
77
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
78
|
+
def <<(*records); end
|
79
|
+
|
80
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
81
|
+
def append(*records); end
|
82
|
+
|
83
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
84
|
+
def push(*records); end
|
85
|
+
|
86
|
+
sig { params(records: T.any(ActiveStorage::Blob, T::Array[ActiveStorage::Blob])).returns(T.self_type) }
|
87
|
+
def concat(*records); end
|
88
|
+
end
|
89
|
+
|
90
|
+
module ActiveStorage::Blob::QueryMethodsReturningRelation
|
153
91
|
sig { returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
154
92
|
def all; end
|
155
93
|
|
@@ -248,137 +186,25 @@ class ActiveStorage::Blob::ActiveRecord_Relation < ActiveRecord::Relation
|
|
248
186
|
|
249
187
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
250
188
|
def extending(*args, &block); end
|
251
|
-
end
|
252
|
-
|
253
|
-
class ActiveStorage::Blob::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
254
|
-
include ActiveStorage::Blob::ActiveRelation_WhereNot
|
255
|
-
include ActiveStorage::Blob::CustomFinderMethods
|
256
|
-
extend T::Sig
|
257
|
-
extend T::Generic
|
258
|
-
Elem = type_member(fixed: ActiveStorage::Blob)
|
259
|
-
|
260
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
261
|
-
def unattached(*args); end
|
262
|
-
|
263
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
264
|
-
def with_attached_preview_image(*args); end
|
265
|
-
|
266
|
-
sig { returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
267
|
-
def all; end
|
268
|
-
|
269
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
270
|
-
def unscoped(&block); end
|
271
|
-
|
272
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
273
|
-
def select(*args); end
|
274
|
-
|
275
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
276
|
-
def reselect(*args); end
|
277
|
-
|
278
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
279
|
-
def order(*args); end
|
280
|
-
|
281
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
282
|
-
def reorder(*args); end
|
283
|
-
|
284
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
285
|
-
def group(*args); end
|
286
|
-
|
287
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
288
|
-
def limit(*args); end
|
289
|
-
|
290
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
291
|
-
def offset(*args); end
|
292
|
-
|
293
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
294
|
-
def joins(*args); end
|
295
|
-
|
296
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
297
|
-
def left_joins(*args); end
|
298
|
-
|
299
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
300
|
-
def left_outer_joins(*args); end
|
301
|
-
|
302
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
303
|
-
def where(*args); end
|
304
|
-
|
305
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
306
|
-
def rewhere(*args); end
|
307
|
-
|
308
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
309
|
-
def preload(*args); end
|
310
|
-
|
311
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
312
|
-
def extract_associated(*args); end
|
313
|
-
|
314
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
315
|
-
def eager_load(*args); end
|
316
|
-
|
317
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
318
|
-
def includes(*args); end
|
319
|
-
|
320
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
321
|
-
def from(*args); end
|
322
|
-
|
323
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
324
|
-
def lock(*args); end
|
325
|
-
|
326
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
327
|
-
def readonly(*args); end
|
328
|
-
|
329
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
330
|
-
def or(*args); end
|
331
|
-
|
332
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
333
|
-
def having(*args); end
|
334
189
|
|
335
|
-
sig
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
def
|
346
|
-
|
347
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
348
|
-
def unscope(*args); end
|
349
|
-
|
350
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
351
|
-
def optimizer_hints(*args); end
|
352
|
-
|
353
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
354
|
-
def merge(*args); end
|
355
|
-
|
356
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
357
|
-
def except(*args); end
|
358
|
-
|
359
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
360
|
-
def only(*args); end
|
361
|
-
|
362
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
363
|
-
def extending(*args, &block); end
|
190
|
+
sig do
|
191
|
+
params(
|
192
|
+
of: T.nilable(Integer),
|
193
|
+
start: T.nilable(Integer),
|
194
|
+
finish: T.nilable(Integer),
|
195
|
+
load: T.nilable(T::Boolean),
|
196
|
+
error_on_ignore: T.nilable(T::Boolean),
|
197
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Blob::ActiveRecord_Relation).void)
|
198
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
199
|
+
end
|
200
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
364
201
|
end
|
365
202
|
|
366
|
-
|
367
|
-
include ActiveStorage::Blob::CustomFinderMethods
|
368
|
-
extend T::Sig
|
369
|
-
extend T::Generic
|
370
|
-
Elem = type_member(fixed: ActiveStorage::Blob)
|
371
|
-
|
372
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
373
|
-
def unattached(*args); end
|
374
|
-
|
375
|
-
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
376
|
-
def with_attached_preview_image(*args); end
|
377
|
-
|
203
|
+
module ActiveStorage::Blob::QueryMethodsReturningAssociationRelation
|
378
204
|
sig { returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
379
205
|
def all; end
|
380
206
|
|
381
|
-
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::
|
207
|
+
sig { params(block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_Relation) }
|
382
208
|
def unscoped(&block); end
|
383
209
|
|
384
210
|
sig { params(args: T.untyped).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
@@ -474,26 +300,24 @@ class ActiveStorage::Blob::ActiveRecord_Associations_CollectionProxy < ActiveRec
|
|
474
300
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveStorage::Blob::ActiveRecord_AssociationRelation) }
|
475
301
|
def extending(*args, &block); end
|
476
302
|
|
477
|
-
sig
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
def
|
303
|
+
sig do
|
304
|
+
params(
|
305
|
+
of: T.nilable(Integer),
|
306
|
+
start: T.nilable(Integer),
|
307
|
+
finish: T.nilable(Integer),
|
308
|
+
load: T.nilable(T::Boolean),
|
309
|
+
error_on_ignore: T.nilable(T::Boolean),
|
310
|
+
block: T.nilable(T.proc.params(e: ActiveStorage::Blob::ActiveRecord_AssociationRelation).void)
|
311
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
312
|
+
end
|
313
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
488
314
|
end
|
489
315
|
|
490
316
|
module ActiveStorage::Blob::GeneratedAssociationMethods
|
491
|
-
extend T::Sig
|
492
|
-
|
493
317
|
sig { returns(::ActiveStorage::Attachment::ActiveRecord_Associations_CollectionProxy) }
|
494
318
|
def attachments; end
|
495
319
|
|
496
|
-
sig { returns(T::Array[
|
320
|
+
sig { returns(T::Array[T.untyped]) }
|
497
321
|
def attachment_ids; end
|
498
322
|
|
499
323
|
sig { params(value: T::Enumerable[::ActiveStorage::Attachment]).void }
|
@@ -502,12 +326,30 @@ module ActiveStorage::Blob::GeneratedAssociationMethods
|
|
502
326
|
sig { returns(T.nilable(::ActiveStorage::Attachment)) }
|
503
327
|
def preview_image_attachment; end
|
504
328
|
|
329
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
|
330
|
+
def build_preview_image_attachment(*args, &block); end
|
331
|
+
|
332
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
|
333
|
+
def create_preview_image_attachment(*args, &block); end
|
334
|
+
|
335
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) }
|
336
|
+
def create_preview_image_attachment!(*args, &block); end
|
337
|
+
|
505
338
|
sig { params(value: T.nilable(::ActiveStorage::Attachment)).void }
|
506
339
|
def preview_image_attachment=(value); end
|
507
340
|
|
508
341
|
sig { returns(T.nilable(::ActiveStorage::Blob)) }
|
509
342
|
def preview_image_blob; end
|
510
343
|
|
344
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
345
|
+
def build_preview_image_blob(*args, &block); end
|
346
|
+
|
347
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
348
|
+
def create_preview_image_blob(*args, &block); end
|
349
|
+
|
350
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) }
|
351
|
+
def create_preview_image_blob!(*args, &block); end
|
352
|
+
|
511
353
|
sig { params(value: T.nilable(::ActiveStorage::Blob)).void }
|
512
354
|
def preview_image_blob=(value); end
|
513
355
|
|