News for hackers. Stuff that matters.
Re:On logic in a Rails app, revisited 6 years later by drchiu on Saturday May 18, 2019 @09:18PM (#19950761)
My team discovered the interactor pattern about 8 months ago and never looked back. It’s worked extremely well and easy to read. We’ve found it necessary to maintain a sensible naming convention for the interactors and to namespace them.

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.

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.