Created
August 22, 2019 13:57
-
-
Save lucianosousa/ba4245f410c9323b3646463de72a6bb4 to your computer and use it in GitHub Desktop.
sorbet or not sorbet?
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
# Old file start | |
module EventsHelper | |
def user_is_owner?(model) | |
user_signed_in? && model.user == current_user | |
end | |
end | |
# Old file end | |
# New file start | |
# typed: false | |
module EventsHelper | |
extend T::Sig | |
sig { params(model: T.any(Event, Proposal)).returns(T.any(TrueClass, FalseClass)) } | |
def user_is_owner?(model) | |
user_signed_in? && model.user == current_user | |
end | |
end | |
# New file end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment