Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload Versioning #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Payload Versioning #12

wants to merge 4 commits into from

Conversation

ryanbrunner
Copy link

Allow payloads to be versioned in MultipleMan. This helps us move message formats forward and make a "clean break" from the past by isolating differences in message payloads to a particular version.

Right now there's only one version to process, so this doesn't do much, but I wanted to have an "official" multiple man version to introduce the versioning on (Payload V2 will come in MM 1.1)

def find_conditions(id)
id.kind_of?(Hash) ? cleanse_id(id) : {multiple_man_identifier: id}
def find_model(payload)
model_class.where(cleanse_id(payload.identify_by)).first || model_class.new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use .first_or_initialize here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants