It's not clear if you want a drop down with all airlines or if they are supposed to be filtered in some way.
If you want all airlines, this works:
<%= select_tag "search_al", options_from_collection_for_select(Aircompany.all, :id, :airline_name), prompt: "All Airlines" %>
Since @t
appears to be a collection of Timetableap
records, you could chose to only display airlines found in the current collection of timetableaps:
<%= select_tag "search_al", options_from_collection_for_select(@t.map(&:aircompany).uniq, :id, :airline_name), prompt: "All Airlines" %>