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

Refactor setLive Method by Extracting Draftable Relations Logic #44

Merged
merged 2 commits into from
Feb 10, 2024
Merged

Refactor setLive Method by Extracting Draftable Relations Logic #44

merged 2 commits into from
Feb 10, 2024

Conversation

vildanbina
Copy link
Contributor

This pull request refactors the setLive method by extracting the logic responsible for replicating and associating draftable relations with the published model into its own method. This change aims to improve the method's readability, maintainability, and extendibility for future enhancements and custom use-cases.

Changes

  • Introduced a new public method named replicateAndAssociateDraftableRelations which encapsulates the logic for handling draftable relations during the publishing process.
  • Adjusted the setLive method to call the newly created replicateAndAssociateDraftableRelations method, thereby simplifying its own logic and focusing on its primary responsibilities.

- Isolates the logic for replicating and associating draftable relations to a published model into a standalone method for improved readability and modularity
- Enhances flexibility for future adjustments and custom use-cases
Copy link
Owner

@oddvalue oddvalue left a comment

Choose a reason for hiding this comment

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

Thanks

@oddvalue oddvalue merged commit 3c61ace into oddvalue:main Feb 10, 2024
7 checks passed
@vildanbina
Copy link
Contributor Author

@oddvalue could you inform me when will be released? would be good to release as soon as you can :)

@oddvalue
Copy link
Owner

@vildanbina this is now in v1.4.0

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.

2 participants