1
레일즈 앱에서 simple_form을 사용하고 있습니다.레일 simple_form 그룹화 된 콜렉션이 작동하지 않습니다.
그룹화 된 컬렉션 선택을 사용하려고합니다.
<%= f.input :employee, collection: @workgroups, as: :grouped_select, group_method: :employees, :label => 'Lead2:' %>
또는
<%= f.association :employee, collection: @workgroups, as: :grouped_select, group_method: :employees, :label => 'Lead2:' %>
내가 = Workgroup.order을 @workgroup하는 컨트롤러를 변경 (: ID) 양식을 부르는 작업에 따라,이 같은 것을해야한다 - 동일한 결과를 얻을 수 있습니다. – Reddirt
오타가 아닌 경우에는'@workgroups = ....'이어야합니다. –
오타 - 미안 해요 – Reddirt