app/views/needs/office_social_workers.html.haml
- if office.present? && office.users.social_workers.any?
- selected = @need.present? ? @need.social_worker_ids : nil
= hidden_field_tag "need[social_worker_ids][]", ""
= select_tag "need[social_worker_ids]", options_from_collection_for_select(office.users.social_workers, :id, :name, selected), { include_blank: false, multiple: true, class: "multiple" }
- else
= select_tag "need[social_worker_ids]", [], disabled: true