Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

[misc] Added beforeDestroy lifecycle example #1211

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

Conversation

adisazhar123
Copy link

@adisazhar123 adisazhar123 commented May 14, 2019

I was looking for a way to cascade delete my objects. I found out that using beforeDestroy did the trick. It wasn't in the docs, so I hope by adding it, it would benefit others.

@sailsbot
Copy link
Collaborator

Hi @adisazhar123! It looks like the title of your pull request doesn’t quite match our guidelines yet. Would you please edit your pull request's title so that it begins with [proposal], [patch], [fixes #<issue number>], [implements #<other PR number>], or [misc]? Once you've edited it, I'll take another look!

@adisazhar123 adisazhar123 changed the title Added afterDestroy lifecycle example [misc] Added afterDestroy lifecycle example May 14, 2019
@sailsbot
Copy link
Collaborator

Thanks for submitting this pull request, @adisazhar123! We'll look at it ASAP.

In the mean time, here are some ways you can help speed things along:

  • discuss this pull request with other contributors and get their feedback. (Reactions and comments can help us make better decisions, anticipate compatibility problems, and prevent bugs.)
  • ask another JavaScript developer to review the files changed in this pull request. (Peer reviews definitely don't guarantee perfection, but they help catch mistakes and enourage collaborative thinking. Code reviews are so useful that some open source projects require a minimum number of reviews before even considering a merge!)
  • if appropriate, ask your business to sponsor your pull request. (Open source is our passion, and our core maintainers volunteer many of their nights and weekends working on Sails. But you only get so many nights and weekends in life, and stuff gets done a lot faster when you can work on it during normal daylight hours.)
  • make sure you've answered the "why?" (Before we can review and merge a pull request, we feel it is important to fully understand the use case: the human reason these changes are important for you, your team, or your organization.)

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

@adisazhar123 adisazhar123 changed the title [misc] Added afterDestroy lifecycle example [misc] Added beforeDestroy lifecycle example May 14, 2019
@balderdashy balderdashy deleted a comment from sailsbot May 14, 2019
@balderdashy balderdashy deleted a comment from sailsbot May 14, 2019
@adisazhar123
Copy link
Author

adisazhar123 commented May 14, 2019

Apologies, not afterDestroy, but beforeDestroy. It's 2.30 am here, a bit sleepy!

@rachaelshaw rachaelshaw added the additive includes new content that needs review (e.g. new section or example code) label May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
additive includes new content that needs review (e.g. new section or example code)
Development

Successfully merging this pull request may close these issues.

3 participants