I was asked in an interview what MVC was. I said MVC is an architecture in which you try to keep the view logic away from the controller logic away from the model logic. All the database queries goes in the models.
But then I was asked in the def index we often do @users = User.all so isnt this a part of the business logic and why should this go in the controller?
Then I was asked if I were to put conditionals then where will I put the logic and I said models.
The interviewer asked me why this difference. User.all in the controller but User.all with conditionals in the model.
I am still confused with this question but I loved the question.
If someone could explain it that would make my day.