Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about using PrivateRelation #1266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexdunae
Copy link

Motivation

I was migrating from sorbet-rails and couldn't find a migration path for RelationType. I searched the Slack channel and came up with this suggestion. I figured it would be helpful to others.

Implementation

n/a

Tests

just docs

@alexdunae alexdunae requested a review from a team as a code owner November 8, 2022 18:02
@alexdunae
Copy link
Author

I've just signed the CLA

Copy link
Contributor

@KaanOzkan KaanOzkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me but I'm not 100% sure on its placement. We can add it to https://github.com/Shopify/tapioca/wiki/Migrating-to-Tapioca as well.

You'll also have to update the documentation on the compiler file itself.

end
~~~

As the name suggests, this will give you type checking during development but disable it at runtime.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be beneficial to give a bit more information here about how Tapioca defines methods on PrivateRelation that returns a Post type. For example, the first! method. That's why this approach gives more static typing benefits.

But I didn't use sorbet-rails and if you think this information is already assumed by an existing sorbet-rails user than it's okay to omit it.

@fazo96
Copy link

fazo96 commented Oct 27, 2023

This looks like it could be a solution for #1140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants