-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add interactor for profiles controller #1373
add interactor for profiles controller #1373
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the interactors and did not know them before :) Let's try it out!
Everything seems to work, I only have some minor improvements and questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work :)
bb95b74
to
7b24d5d
Compare
7b24d5d
to
3351e06
Compare
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/