Complex & Multi step actions guide
This guide should talk about:
- changes
- preparations
- how to think about using hooks in both cases
- real-world examples where you might use hooks
- considerations between things like "before action", "before transaction" etc.
- some examples of manage_relationship
- reactor as an alternative way of doing complex workflows (I or someone else can write this part)
It does not have to explain these things in complete depth, we can link to other relevant guides.
I can commit some time to this in the next few weeks. Expect questions on the forum or discord as I work through it since I'm not an expert. :)
@chazwatkins I don't have the practical knowledge to get anywhere on this as a whole myself. But I'd be happy to lend a hand if you find any chunks that can be reasonably delegated.
@chazwatkins I don't have the practical knowledge to get anywhere on this as a whole myself. But I'd be happy to lend a hand if you find any chunks that can be reasonably delegated.
@mkschell Sure. I've been busy this month and won't get around to this for another few weeks. If you want to dive in and get started on something, go for it. Happy to collaborate on it as time permits.
Putting some notes here on ideas for the guide
- changes
- Creating a parent record and then a child record in one action
- preparations
- how to think about using hooks in both cases
- real-world examples where you might use hooks
- Maybe use an
after_actionhook to create the child record - Maybe use an external API to fetch data in a
before_actionhook - Not sure of a scenario to use
before/after transactionyet
- Maybe use an
- considerations between things like "before action", "before transaction" etc.
- Section explaining the uses of each, when they should be considered, and when they should be avoided
- some examples of manage_relationship
- multi-level
manage_relationship - use of
cascade_updateandcascade_delete- Also, when should these be used vs postgres referenceson_delete
- multi-level
- reactor as an alternative way of doing complex workflows (I or someone else can write this part)
- This will come last as I have zero experience with Reactor. But, I'll study up on it when I get to it.