Files
grecia/app/helpers/officing_helper.rb
Javi Martín 1632990838 Extract component to render officing results form
In a couple of commits we're going to add some styles for this form, and
it's easier to know where to add these styles when there's a component.
2025-04-03 15:00:12 +02:00

10 lines
277 B
Ruby

module OfficingHelper
def booths_for_officer_select_options(officer_assignments)
options = officer_assignments.map do |oa|
[oa.booth_assignment.booth.name.to_s, oa.id]
end
options.sort_by! { |x| x[0] }
options_for_select(options, params[:oa])
end
end