Created
December 24, 2016 19:14
-
-
Save bleonard/58f6db794d6a1f72ebc4b30bc2777a7d 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 TaskChangesSubscriber | |
include ResqueBus::Subscriber | |
subscribe :task_changed | |
subscribe :changed_when_opened, "bus_event_type" => "task_changed", "state" => "opened" | |
def task_changed(attributes) | |
# gets called for all task changes | |
end | |
def changed_when_opened | |
# only gets called when state == "opened" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment