app/views/projects/_project_contribution_fields.html.haml
.col-lg-4
%label
Contributors
.selection-container
.icon
%span
= icon('terminal')
.selections
%ul
- @project.contributions.each do |c|
- if c.contributor.present?
%li
%span
= link_to icon('times'), contribution_path(c), method: :delete
= image_tag c.contributor.avatar_url, class: 'avatar tiny'
.col-lg-8
- @selected = @project.contributors.collect
= select_tag :contributions_attributes, options_from_collection_for_select(@selected, :id, :username), { multiple: true, size: 10, name: 'project[contributions_attributes][][contributor_id]', class: 'form-control'}