Rails 4 collection_select is MVC violated? -


i have small question collection_select in rails 4. when call in collection_select elements of table example:

<%= f.collection_select :category_id, category.all, :id, :name %> 

is mvc violated? in other words: if have collection_select in view of products , calls category.all in view, me violated mvc pattern. cause category.all should in model.

tell me if i'm in right.

passing collection collection_select list of options not violation of mvc pattern, it's how collection_select seeded data.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -