-
-
Save paulcsmith/f9ed10256fa67871eade1322dddcee05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Repository | |
# table definitions... | |
# Then add this | |
def owner : Team | User | |
if super.is_a?(Team) | |
super.as(Team) | |
else | |
super.as(User) | |
end | |
end | |
def owner! : Team | User | |
if super.is_a?(Team) | |
super.as(Team) | |
else | |
super.as(User) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment