Skip to content

Conversation

hbmaclean
Copy link

No description provided.


is(
decode_json(request(
Copy link
Author

Choose a reason for hiding this comment

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

This test was failing. I initially assumed it was me and my new environment; but removing decode_json() here fixed it.

@@ -218,6 +218,43 @@ sub save {
return $self->id;
}

=head2 publish
Copy link
Author

Choose a reason for hiding this comment

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

Thinking about this more: Depending on the scope and anticipated lifetime of the project, I might rather write a generic "update()" method that takes a hashref of columns and values to be updated. In fact I'd prefer that save() were generic, functioning like a merge statement (insert or update) - so that the "new vs. update" thinking is when the object is instantiated; and then the object's setters can be used; and finally saved... But again, it depends on how many data changes are likely and how long the project will remain.

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.

1 participant