|
|
|
|
|
by metaphorm
4772 days ago
|
|
do you find the Interactor pattern preferable to implementing a different re-use pattern for Controllers though? Why not use, for example, use Abstract Controllers and just include them as a Mixin to your Controllers. e.g. CommentMixin would be an abstract controller class that is included in any controller that has an object that can be commented on. |
|
Also, as the article describes, interactors are plain old ruby objects, so are straightforward to test. An Abstract Controller, being a Rails construct, would require you to jump through some Rails hoops to test.