Re:On logic in a Rails app, revisited 6 years later
by karmakaze on Sunday May 19, 2019 @12:02PM
(#19953945)
What are some of the parts to your naming conventions if there are any prevailing patterns?
Re:On logic in a Rails app, revisited 6 years later
by drchiu on Sunday May 19, 2019 @02:16PM
(#19954610)
Currently we're experimenting with namespacing per "ownership" of that namespace.
For instance, if the interactor is in charge of onboarding a new account, we have it under something like this:
Account::SetupOnboarding
Note that we also have an Account model here and so anything namespaced under it will be assumed to take place in that context.
The other pattern we’ve found to work decently well is to ensure most operations are idempotent. It makes it easy to ensure the correct state.