Skip to content

Instantly share code, notes, and snippets.

@madzhuga
Created November 22, 2017 04:20
Show Gist options
  • Save madzhuga/6cf605aa979683da7f55b203bdbd1bb7 to your computer and use it in GitHub Desktop.
Save madzhuga/6cf605aa979683da7f55b203bdbd1bb7 to your computer and use it in GitHub Desktop.
class SomeEvent < RailsWorkflow::EventOperation
# We getting here event context - which we can use to match
# this operation to a given event
def match(event_context)
event_context[:user_id] == user.id
end
private
def user
data[:user]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment