I have a 2D array that is to have the name and slug of each school in a database, as pairs. I want to start this array off empty and then add each school one-by-one to it.
This is what I have tried:
<% schoolSelect = [] %>
<% @schools.each { |x| schoolSelect += [x.name, x.slug] } %>
However, this adds the name and slug of a school into the array in session, instead of two-dimensional.
select? If that is the case there might be better solutions, since there are quite clever form builder methods.