Created
April 3, 2015 17:39
-
-
Save brandonhilkert/a83f2bf7b231f03079f8 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
| class Handler | |
| def self.receive(model, action, message) | |
| begin | |
| "#{model.classify}::#{action.classify}".constantize.new(message).perform | |
| rescue NameError | |
| Rails.logger.info("No map for #{model.classify}::#{action.classify}") | |
| return | |
| end | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use Temping for testing stuff like this, although it might not match this use case exactly.