Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

What's the usage of before and afterSave as arguments in save method? #74

@igorsantos07

Description

@igorsantos07

I was wondering if there's any difference between:

  1. running code, calling save inside an if-clause and running more code after
  2. running save with before and afterSave closures as arguments

The number 2 looks more like a non-standard way to add hooks that are hardly (IMHO) different between situations where save() would be called. Thus, we could drop those arguments in favor of a cleaner codebase and less confusion (since now with actual, instance before/afterSave methods, both signatures are different and one does not override the other anymore).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions