I have a small question about collection_select
in Rails 4.
When we call in the collection_select all the elements of a table
example:
<%= f.collection_select :category_id, Category.all, :id, :name %>
Is MVC violated?
In other words: if I have a collection_select in the view of products
and it calls Category.all
in this view, for me we are violated the MVC pattern. Cause Category.all
is something that should be in a Model.
Tell me if I'm in right.