You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 5, 2023. It is now read-only.
There are several kinds of relations of a model: `User::ActiveRecord_Relation`, `User::ActiveRecord_AssociationRelation` and `User::ActiveRecord_Associations_CollectionProxy`. Usually the code may need just any relation type. We add a `Model::RelationType` type alias for every model to use it.
166
+
167
+
```ruby
168
+
classUser
169
+
RelationType=T.type_alias do
170
+
T.any(
171
+
User::ActiveRecord_Relation,
172
+
User::ActiveRecord_AssociationRelation,
173
+
User::ActiveRecord_Associations_CollectionProxy
174
+
)
175
+
end
176
+
end
177
+
```
178
+
162
179
### Controllers
163
180
```sh
164
181
❯ bundle exec rake rails_rbi:custom
@@ -231,13 +248,16 @@ instructions specify that `sorbet-rails` should be placed in the [`:default`
231
248
group](https://bundler.io/v2.0/guides/groups.html) of the `Gemfile`, not a
232
249
specific environment group (eg. `development` only).
233
250
234
-
- Relation class: Making the relations available at runtime (they are normally private constants, the gem makes them public)
0 commit comments