|
|
|
|
|
by tomblomfield
4468 days ago
|
|
I agree that Rails is polarizing into two schools - Steve Klabnik's blog post details this really well. But I don't think that moving towards more single-responsibility objects means you have to give up all that Rails offers - particularly the preference for concise, human-readable APIs and convention-over-configuration. Ie, we don't need tonnes of boiler-plate just because we want to use more objects. We put this permission check in the controller and not the interactor because it seems like the controller should generally be responsible for authentication & permissioning. Once you get to the interactor, it should just be told "Perform this interaction". Not "check if you can perform it, and then perform it". |
|
They are overlapping camps but not exactly the same.