Ruby on Rails
1
Вклад в тег
<%= f.collection_select :category_id, Category.order(:name), :id, :name, class: 'span12' %>
Project.where(:category_id => params[:category_id])
Category.includes(:projects).find(params[:category_id])