acts-as-messageable 0.5.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/test.yml +152 -0
- data/.rubocop.yml +14 -1
- data/.rubocop_todo.yml +49 -7
- data/.ruby-version +1 -0
- data/Appraisals +11 -0
- data/Dockerfile +2 -1
- data/Gemfile +19 -13
- data/Gemfile.lock +186 -97
- data/README.md +2 -3
- data/Rakefile +6 -1
- data/VERSION +1 -1
- data/acts-as-messageable.gemspec +193 -40
- data/bin/tapioca +29 -0
- data/docker-compose.yml +82 -71
- data/gemfiles/rails_3.2.gemfile +14 -9
- data/gemfiles/rails_4.2.gemfile +14 -9
- data/gemfiles/rails_5.2.gemfile +14 -9
- data/gemfiles/rails_6.0.gemfile +14 -9
- data/gemfiles/rails_7.0.gemfile +29 -0
- data/gemfiles/rails_master.gemfile +15 -9
- data/lib/acts-as-messageable.rb +1 -0
- data/lib/acts_as_messageable/message.rb +62 -5
- data/lib/acts_as_messageable/model.rb +71 -20
- data/lib/acts_as_messageable/rails3.rb +27 -2
- data/lib/acts_as_messageable/rails4.rb +31 -4
- data/lib/acts_as_messageable/rails6.rb +34 -2
- data/lib/acts_as_messageable/railtie.rb +1 -0
- data/lib/acts_as_messageable/relation.rb +18 -2
- data/lib/acts_as_messageable/scopes.rb +11 -0
- data/lib/acts_as_messageable.rb +18 -0
- data/lib/generators/acts_as_messageable/migration/migration_generator.rb +4 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration.rb +1 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +1 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +1 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_permanent.rb +1 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/actionpack.rbi +428 -0
- data/sorbet/rbi/annotations/actionview.rbi +77 -0
- data/sorbet/rbi/annotations/activerecord.rbi +18 -0
- data/sorbet/rbi/annotations/activesupport.rbi +52 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/railties.rbi +58 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
- data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
- data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
- data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
- data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
- data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
- data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
- data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
- data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
- data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
- data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
- data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
- data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
- data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
- data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
- data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
- data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
- data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
- data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
- data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
- data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
- data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
- data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
- data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
- data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
- data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
- data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
- data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
- data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
- data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
- data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
- data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
- data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
- data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
- data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
- data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
- data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
- data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
- data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
- data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
- data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
- data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
- data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
- data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
- data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
- data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
- data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
- data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
- data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
- data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
- data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
- data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
- data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
- data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
- data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
- data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
- data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
- data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
- data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
- data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
- data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
- data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
- data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
- data/sorbet/rbi/shims/activerecord.rbi +4 -0
- data/sorbet/rbi/shims/model.rbi +9 -0
- data/sorbet/tapioca/config.yml +10 -0
- data/sorbet/tapioca/pre_require.rb +5 -0
- data/sorbet/tapioca/require.rb +10 -0
- data/spec/acts_as_messageable_spec.rb +7 -4
- data/spec/custom_class_spec.rb +1 -0
- data/spec/custom_required_spec.rb +8 -4
- data/spec/group_messages_spec.rb +1 -0
- data/spec/migrations_spec.rb +2 -1
- data/spec/spec_helper.rb +19 -9
- data/spec/support/admin.rb +3 -0
- data/spec/support/custom_message.rb +3 -0
- data/spec/support/custom_message_uuid.rb +1 -0
- data/spec/support/custom_search_user.rb +3 -0
- data/spec/support/men.rb +1 -0
- data/spec/support/send_message.rb +8 -1
- data/spec/support/table_schema.rb +7 -6
- data/spec/support/user.rb +3 -0
- data/spec/support/uuid_user.rb +3 -0
- data/tasks/types.rake +46 -0
- metadata +261 -11
- data/.travis.yml +0 -55
@@ -0,0 +1,343 @@
|
|
1
|
+
# This is an autogenerated file for dynamic methods in CustomSearchUser
|
2
|
+
# Please rerun bundle exec rake rails_rbi:models[CustomSearchUser] to regenerate.
|
3
|
+
|
4
|
+
# typed: strong
|
5
|
+
module CustomSearchUser::ActiveRelation_WhereNot
|
6
|
+
sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
|
7
|
+
def not(opts, *rest); end
|
8
|
+
end
|
9
|
+
|
10
|
+
module CustomSearchUser::GeneratedAttributeMethods
|
11
|
+
sig { returns(T.nilable(String)) }
|
12
|
+
def email; end
|
13
|
+
|
14
|
+
sig { params(value: T.nilable(T.any(String, Symbol))).void }
|
15
|
+
def email=(value); end
|
16
|
+
|
17
|
+
sig { returns(T::Boolean) }
|
18
|
+
def email?; end
|
19
|
+
|
20
|
+
sig { returns(Integer) }
|
21
|
+
def id; end
|
22
|
+
|
23
|
+
sig { params(value: T.any(Numeric, ActiveSupport::Duration)).void }
|
24
|
+
def id=(value); end
|
25
|
+
|
26
|
+
sig { returns(T::Boolean) }
|
27
|
+
def id?; end
|
28
|
+
end
|
29
|
+
|
30
|
+
module CustomSearchUser::GeneratedAssociationMethods
|
31
|
+
sig { returns(ActiveRecord::Associations::CollectionProxy) }
|
32
|
+
def received_messages_relation; end
|
33
|
+
|
34
|
+
sig { params(value: T::Enumerable[T.untyped]).void }
|
35
|
+
def received_messages_relation=(value); end
|
36
|
+
|
37
|
+
sig { returns(ActiveRecord::Associations::CollectionProxy) }
|
38
|
+
def sent_messages_relation; end
|
39
|
+
|
40
|
+
sig { params(value: T::Enumerable[T.untyped]).void }
|
41
|
+
def sent_messages_relation=(value); end
|
42
|
+
end
|
43
|
+
|
44
|
+
module CustomSearchUser::CustomFinderMethods
|
45
|
+
sig { params(limit: Integer).returns(T::Array[CustomSearchUser]) }
|
46
|
+
def first_n(limit); end
|
47
|
+
|
48
|
+
sig { params(limit: Integer).returns(T::Array[CustomSearchUser]) }
|
49
|
+
def last_n(limit); end
|
50
|
+
|
51
|
+
sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[CustomSearchUser]) }
|
52
|
+
def find_n(*args); end
|
53
|
+
|
54
|
+
sig { params(id: T.nilable(Integer)).returns(T.nilable(CustomSearchUser)) }
|
55
|
+
def find_by_id(id); end
|
56
|
+
|
57
|
+
sig { params(id: Integer).returns(CustomSearchUser) }
|
58
|
+
def find_by_id!(id); end
|
59
|
+
end
|
60
|
+
|
61
|
+
class CustomSearchUser < ActiveRecord::Base
|
62
|
+
include CustomSearchUser::GeneratedAttributeMethods
|
63
|
+
include CustomSearchUser::GeneratedAssociationMethods
|
64
|
+
extend CustomSearchUser::CustomFinderMethods
|
65
|
+
extend CustomSearchUser::QueryMethodsReturningRelation
|
66
|
+
RelationType = T.type_alias { T.any(CustomSearchUser::ActiveRecord_Relation, CustomSearchUser::ActiveRecord_Associations_CollectionProxy, CustomSearchUser::ActiveRecord_AssociationRelation) }
|
67
|
+
end
|
68
|
+
|
69
|
+
module CustomSearchUser::QueryMethodsReturningRelation
|
70
|
+
sig { returns(CustomSearchUser::ActiveRecord_Relation) }
|
71
|
+
def all; end
|
72
|
+
|
73
|
+
sig { params(block: T.nilable(T.proc.void)).returns(CustomSearchUser::ActiveRecord_Relation) }
|
74
|
+
def unscoped(&block); end
|
75
|
+
|
76
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
77
|
+
def reselect(*args); end
|
78
|
+
|
79
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
80
|
+
def order(*args); end
|
81
|
+
|
82
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
83
|
+
def reorder(*args); end
|
84
|
+
|
85
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
86
|
+
def group(*args); end
|
87
|
+
|
88
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
89
|
+
def limit(*args); end
|
90
|
+
|
91
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
92
|
+
def offset(*args); end
|
93
|
+
|
94
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
95
|
+
def joins(*args); end
|
96
|
+
|
97
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
98
|
+
def left_joins(*args); end
|
99
|
+
|
100
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
101
|
+
def left_outer_joins(*args); end
|
102
|
+
|
103
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
104
|
+
def where(*args); end
|
105
|
+
|
106
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
107
|
+
def rewhere(*args); end
|
108
|
+
|
109
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
110
|
+
def preload(*args); end
|
111
|
+
|
112
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
113
|
+
def extract_associated(*args); end
|
114
|
+
|
115
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
116
|
+
def eager_load(*args); end
|
117
|
+
|
118
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
119
|
+
def includes(*args); end
|
120
|
+
|
121
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
122
|
+
def from(*args); end
|
123
|
+
|
124
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
125
|
+
def lock(*args); end
|
126
|
+
|
127
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
128
|
+
def readonly(*args); end
|
129
|
+
|
130
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
131
|
+
def or(*args); end
|
132
|
+
|
133
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
134
|
+
def having(*args); end
|
135
|
+
|
136
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
137
|
+
def create_with(*args); end
|
138
|
+
|
139
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
140
|
+
def distinct(*args); end
|
141
|
+
|
142
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
143
|
+
def references(*args); end
|
144
|
+
|
145
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
146
|
+
def none(*args); end
|
147
|
+
|
148
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
149
|
+
def unscope(*args); end
|
150
|
+
|
151
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
152
|
+
def optimizer_hints(*args); end
|
153
|
+
|
154
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
155
|
+
def merge(*args); end
|
156
|
+
|
157
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
158
|
+
def except(*args); end
|
159
|
+
|
160
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_Relation) }
|
161
|
+
def only(*args); end
|
162
|
+
|
163
|
+
sig { params(block: T.proc.params(e: CustomSearchUser).returns(T::Boolean)).returns(T::Array[CustomSearchUser]) }
|
164
|
+
def select(&block); end
|
165
|
+
|
166
|
+
sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(CustomSearchUser::ActiveRecord_Relation) }
|
167
|
+
def select_columns(*args); end
|
168
|
+
|
169
|
+
sig { params(args: Symbol).returns(CustomSearchUser::ActiveRecord_Relation) }
|
170
|
+
def where_missing(*args); end
|
171
|
+
|
172
|
+
sig { params(column: Symbol, values: T::Array[T.untyped]).returns(CustomSearchUser::ActiveRecord_Relation) }
|
173
|
+
def in_order_of(column, values); end
|
174
|
+
|
175
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(CustomSearchUser::ActiveRecord_Relation) }
|
176
|
+
def extending(*args, &block); end
|
177
|
+
|
178
|
+
sig do
|
179
|
+
params(
|
180
|
+
of: T.nilable(Integer),
|
181
|
+
start: T.nilable(Integer),
|
182
|
+
finish: T.nilable(Integer),
|
183
|
+
load: T.nilable(T::Boolean),
|
184
|
+
error_on_ignore: T.nilable(T::Boolean),
|
185
|
+
block: T.nilable(T.proc.params(e: CustomSearchUser::ActiveRecord_Relation).void)
|
186
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
187
|
+
end
|
188
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
189
|
+
end
|
190
|
+
|
191
|
+
module CustomSearchUser::QueryMethodsReturningAssociationRelation
|
192
|
+
sig { returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
193
|
+
def all; end
|
194
|
+
|
195
|
+
sig { params(block: T.nilable(T.proc.void)).returns(CustomSearchUser::ActiveRecord_Relation) }
|
196
|
+
def unscoped(&block); end
|
197
|
+
|
198
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
199
|
+
def reselect(*args); end
|
200
|
+
|
201
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
202
|
+
def order(*args); end
|
203
|
+
|
204
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
205
|
+
def reorder(*args); end
|
206
|
+
|
207
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
208
|
+
def group(*args); end
|
209
|
+
|
210
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
211
|
+
def limit(*args); end
|
212
|
+
|
213
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
214
|
+
def offset(*args); end
|
215
|
+
|
216
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
217
|
+
def joins(*args); end
|
218
|
+
|
219
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
220
|
+
def left_joins(*args); end
|
221
|
+
|
222
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
223
|
+
def left_outer_joins(*args); end
|
224
|
+
|
225
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
226
|
+
def where(*args); end
|
227
|
+
|
228
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
229
|
+
def rewhere(*args); end
|
230
|
+
|
231
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
232
|
+
def preload(*args); end
|
233
|
+
|
234
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
235
|
+
def extract_associated(*args); end
|
236
|
+
|
237
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
238
|
+
def eager_load(*args); end
|
239
|
+
|
240
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
241
|
+
def includes(*args); end
|
242
|
+
|
243
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
244
|
+
def from(*args); end
|
245
|
+
|
246
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
247
|
+
def lock(*args); end
|
248
|
+
|
249
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
250
|
+
def readonly(*args); end
|
251
|
+
|
252
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
253
|
+
def or(*args); end
|
254
|
+
|
255
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
256
|
+
def having(*args); end
|
257
|
+
|
258
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
259
|
+
def create_with(*args); end
|
260
|
+
|
261
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
262
|
+
def distinct(*args); end
|
263
|
+
|
264
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
265
|
+
def references(*args); end
|
266
|
+
|
267
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
268
|
+
def none(*args); end
|
269
|
+
|
270
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
271
|
+
def unscope(*args); end
|
272
|
+
|
273
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
274
|
+
def optimizer_hints(*args); end
|
275
|
+
|
276
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
277
|
+
def merge(*args); end
|
278
|
+
|
279
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
280
|
+
def except(*args); end
|
281
|
+
|
282
|
+
sig { params(args: T.untyped).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
283
|
+
def only(*args); end
|
284
|
+
|
285
|
+
sig { params(block: T.proc.params(e: CustomSearchUser).returns(T::Boolean)).returns(T::Array[CustomSearchUser]) }
|
286
|
+
def select(&block); end
|
287
|
+
|
288
|
+
sig { params(args: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
289
|
+
def select_columns(*args); end
|
290
|
+
|
291
|
+
sig { params(args: Symbol).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
292
|
+
def where_missing(*args); end
|
293
|
+
|
294
|
+
sig { params(column: Symbol, values: T::Array[T.untyped]).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
295
|
+
def in_order_of(column, values); end
|
296
|
+
|
297
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(CustomSearchUser::ActiveRecord_AssociationRelation) }
|
298
|
+
def extending(*args, &block); end
|
299
|
+
|
300
|
+
sig do
|
301
|
+
params(
|
302
|
+
of: T.nilable(Integer),
|
303
|
+
start: T.nilable(Integer),
|
304
|
+
finish: T.nilable(Integer),
|
305
|
+
load: T.nilable(T::Boolean),
|
306
|
+
error_on_ignore: T.nilable(T::Boolean),
|
307
|
+
block: T.nilable(T.proc.params(e: CustomSearchUser::ActiveRecord_AssociationRelation).void)
|
308
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
309
|
+
end
|
310
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
311
|
+
end
|
312
|
+
|
313
|
+
class CustomSearchUser::ActiveRecord_Relation < ActiveRecord::Relation
|
314
|
+
include CustomSearchUser::ActiveRelation_WhereNot
|
315
|
+
include CustomSearchUser::CustomFinderMethods
|
316
|
+
include CustomSearchUser::QueryMethodsReturningRelation
|
317
|
+
Elem = type_member {{fixed: CustomSearchUser}}
|
318
|
+
end
|
319
|
+
|
320
|
+
class CustomSearchUser::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
321
|
+
include CustomSearchUser::ActiveRelation_WhereNot
|
322
|
+
include CustomSearchUser::CustomFinderMethods
|
323
|
+
include CustomSearchUser::QueryMethodsReturningAssociationRelation
|
324
|
+
Elem = type_member {{fixed: CustomSearchUser}}
|
325
|
+
end
|
326
|
+
|
327
|
+
class CustomSearchUser::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
328
|
+
include CustomSearchUser::CustomFinderMethods
|
329
|
+
include CustomSearchUser::QueryMethodsReturningAssociationRelation
|
330
|
+
Elem = type_member {{fixed: CustomSearchUser}}
|
331
|
+
|
332
|
+
sig { params(records: T.any(CustomSearchUser, T::Array[CustomSearchUser])).returns(T.self_type) }
|
333
|
+
def <<(*records); end
|
334
|
+
|
335
|
+
sig { params(records: T.any(CustomSearchUser, T::Array[CustomSearchUser])).returns(T.self_type) }
|
336
|
+
def append(*records); end
|
337
|
+
|
338
|
+
sig { params(records: T.any(CustomSearchUser, T::Array[CustomSearchUser])).returns(T.self_type) }
|
339
|
+
def push(*records); end
|
340
|
+
|
341
|
+
sig { params(records: T.any(CustomSearchUser, T::Array[CustomSearchUser])).returns(T.self_type) }
|
342
|
+
def concat(*records); end
|
343
|
+
end
|
@@ -0,0 +1,119 @@
|
|
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 { returns(T.nilable(T.attached_class)) }
|
60
|
+
def self.take; end
|
61
|
+
|
62
|
+
sig { returns(T.attached_class) }
|
63
|
+
def self.take!; 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.create(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.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.new(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_create(attributes = nil, &block); end
|
76
|
+
|
77
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
78
|
+
def self.first_or_create!(attributes = nil, &block); end
|
79
|
+
|
80
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: T.attached_class).void)).returns(T.attached_class) }
|
81
|
+
def self.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: T.attached_class).void)
|
90
|
+
).returns(T::Enumerator[T.attached_class])
|
91
|
+
end
|
92
|
+
def self.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[T.attached_class]).void)
|
101
|
+
).returns(T::Enumerator[T::Array[T.attached_class]])
|
102
|
+
end
|
103
|
+
def self.find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
104
|
+
|
105
|
+
sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
106
|
+
def self.any?(&block); end
|
107
|
+
|
108
|
+
sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
109
|
+
def self.many?(&block); end
|
110
|
+
|
111
|
+
sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
112
|
+
def self.none?(&block); end
|
113
|
+
|
114
|
+
sig { params(block: T.nilable(T.proc.params(e: T.attached_class).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
115
|
+
def self.one?(&block); end
|
116
|
+
|
117
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
118
|
+
def self.exists?(conditions = nil); end
|
119
|
+
end
|
@@ -0,0 +1,180 @@
|
|
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
|
+
|
7
|
+
sig { params(args: T.untyped).returns(Elem) }
|
8
|
+
def find(*args); end
|
9
|
+
|
10
|
+
sig { params(args: T.untyped).returns(T.nilable(Elem)) }
|
11
|
+
def find_by(*args); end
|
12
|
+
|
13
|
+
sig { params(args: T.untyped).returns(Elem) }
|
14
|
+
def find_by!(*args); end
|
15
|
+
|
16
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
17
|
+
def find_or_initialize_by(attributes, &block); end
|
18
|
+
|
19
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
20
|
+
def find_or_create_by(attributes, &block); end
|
21
|
+
|
22
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
23
|
+
def find_or_create_by!(attributes, &block); end
|
24
|
+
|
25
|
+
sig { returns(T.nilable(Elem)) }
|
26
|
+
def first; end
|
27
|
+
|
28
|
+
sig { returns(Elem) }
|
29
|
+
def first!; end
|
30
|
+
|
31
|
+
sig { returns(T.nilable(Elem)) }
|
32
|
+
def second; end
|
33
|
+
|
34
|
+
sig { returns(Elem) }
|
35
|
+
def second!; end
|
36
|
+
|
37
|
+
sig { returns(T.nilable(Elem)) }
|
38
|
+
def third; end
|
39
|
+
|
40
|
+
sig { returns(Elem) }
|
41
|
+
def third!; end
|
42
|
+
|
43
|
+
sig { returns(T.nilable(Elem)) }
|
44
|
+
def third_to_last; end
|
45
|
+
|
46
|
+
sig { returns(Elem) }
|
47
|
+
def third_to_last!; end
|
48
|
+
|
49
|
+
sig { returns(T.nilable(Elem)) }
|
50
|
+
def second_to_last; end
|
51
|
+
|
52
|
+
sig { returns(Elem) }
|
53
|
+
def second_to_last!; end
|
54
|
+
|
55
|
+
sig { returns(T.nilable(Elem)) }
|
56
|
+
def last; end
|
57
|
+
|
58
|
+
sig { returns(Elem) }
|
59
|
+
def last!; end
|
60
|
+
|
61
|
+
sig { returns(T.nilable(Elem)) }
|
62
|
+
def take; end
|
63
|
+
|
64
|
+
sig { returns(Elem) }
|
65
|
+
def take!; end
|
66
|
+
|
67
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
68
|
+
def create(attributes = nil, &block); end
|
69
|
+
|
70
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
71
|
+
def create!(attributes = nil, &block); end
|
72
|
+
|
73
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
74
|
+
def new(attributes = nil, &block); end
|
75
|
+
|
76
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
77
|
+
def build(attributes = nil, &block); end
|
78
|
+
|
79
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
80
|
+
def first_or_create(attributes = nil, &block); end
|
81
|
+
|
82
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
83
|
+
def first_or_create!(attributes = nil, &block); end
|
84
|
+
|
85
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
86
|
+
def first_or_initialize(attributes = 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: Elem).void)
|
95
|
+
).returns(T::Enumerator[Elem])
|
96
|
+
end
|
97
|
+
def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
98
|
+
|
99
|
+
sig do
|
100
|
+
params(
|
101
|
+
start: T.nilable(Integer),
|
102
|
+
finish: T.nilable(Integer),
|
103
|
+
batch_size: T.nilable(Integer),
|
104
|
+
error_on_ignore: T.nilable(T::Boolean),
|
105
|
+
block: T.nilable(T.proc.params(e: T::Array[Elem]).void)
|
106
|
+
).returns(T::Enumerator[T::Array[Elem]])
|
107
|
+
end
|
108
|
+
def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, &block); end
|
109
|
+
|
110
|
+
sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
111
|
+
def any?(&block); end
|
112
|
+
|
113
|
+
sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
114
|
+
def many?(&block); end
|
115
|
+
|
116
|
+
sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
117
|
+
def none?(&block); end
|
118
|
+
|
119
|
+
sig { params(block: T.nilable(T.proc.params(e: Elem).returns(T.nilable(T::Boolean)))).returns(T::Boolean) }
|
120
|
+
def one?(&block); end
|
121
|
+
|
122
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
123
|
+
def exists?(conditions = nil); end
|
124
|
+
|
125
|
+
sig { override.params(block: T.proc.params(e: Elem).void).returns(T::Array[Elem]) }
|
126
|
+
def each(&block); end
|
127
|
+
|
128
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[Elem]) }
|
129
|
+
def flatten(level); end
|
130
|
+
|
131
|
+
sig { returns(T::Array[Elem]) }
|
132
|
+
def to_a; end
|
133
|
+
|
134
|
+
sig { type_parameters(:U).params(blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U))).returns(T::Array[T.type_parameter(:U)]) }
|
135
|
+
def map(&blk); end
|
136
|
+
|
137
|
+
sig { returns(T::Boolean) }
|
138
|
+
def empty?; end
|
139
|
+
end
|
140
|
+
|
141
|
+
class ActiveRecord::AssociationRelation < ActiveRecord::Relation
|
142
|
+
Elem = type_member {{fixed: T.untyped}}
|
143
|
+
|
144
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
145
|
+
def new(attributes = nil, &block); end
|
146
|
+
|
147
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
148
|
+
def build(attributes = nil, &block); end
|
149
|
+
|
150
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
151
|
+
def create(attributes = nil, &block); end
|
152
|
+
|
153
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
154
|
+
def create!(attributes = nil, &block); end
|
155
|
+
end
|
156
|
+
|
157
|
+
class ActiveRecord::Associations::CollectionProxy < ActiveRecord::Relation
|
158
|
+
Elem = type_member {{fixed: T.untyped}}
|
159
|
+
|
160
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
161
|
+
def new(attributes = nil, &block); end
|
162
|
+
|
163
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
164
|
+
def build(attributes = nil, &block); end
|
165
|
+
|
166
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
167
|
+
def create(attributes = nil, &block); end
|
168
|
+
|
169
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Elem).void)).returns(Elem) }
|
170
|
+
def create!(attributes = nil, &block); end
|
171
|
+
|
172
|
+
sig { params(args: T.untyped).returns(Elem) }
|
173
|
+
def find(*args); end
|
174
|
+
|
175
|
+
sig { params(limit: T.untyped).returns(T.nilable(Elem)) }
|
176
|
+
def last(limit = nil); end
|
177
|
+
|
178
|
+
sig { returns(T::Boolean) }
|
179
|
+
def empty?; end
|
180
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# Needed to generate types for ActiveRecord::Base
|
5
|
+
require 'rails/generators/actions'
|
6
|
+
require 'rails/generators/base'
|
7
|
+
require 'rails/generators/migration'
|
8
|
+
require 'rails/generators/active_record'
|
9
|
+
require 'rails/all'
|
10
|
+
require 'faraday/connection'
|