Last active
June 13, 2018 15:42
-
-
Save olvap/c610ef1b6ef964a325635f4b42a47ba1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def default_grade | |
return nil unless grades | |
return '7' if grades.include?('7') | |
grades.first | |
end | |
def default_grade | |
((['7'] & grades) + grades).first | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment