Closed tyranja closed 1 month ago
In order to make the code in the controller more readable, I started to use interactors.
I used the interactors to encapsulate logic and move it out of the controller. This has the advantage that it can also be tested separately.
https://github.com/collectiveidea/interactor https://medium.com/@lucaspolonuer/ruby-on-rails-boost-your-software-design-skills-with-interactors-e07f1f9a711e https://blog.saeloun.com/2020/05/06/rails-using-interactor-gem/
In order to make the code in the controller more readable, I started to use interactors.
I used the interactors to encapsulate logic and move it out of the controller. This has the advantage that it can also be tested separately.
https://github.com/collectiveidea/interactor https://medium.com/@lucaspolonuer/ruby-on-rails-boost-your-software-design-skills-with-interactors-e07f1f9a711e https://blog.saeloun.com/2020/05/06/rails-using-interactor-gem/