Created
May 19, 2020 13:19
-
-
Save kouyaf77/399328d185042493a0900106fa586887 to your computer and use it in GitHub Desktop.
polymorphic_anti_pattern.rb
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
case like.likable | |
when Post | |
PostExcutor.call(like) | |
when Comment | |
CommentExcutor.call(like) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment