Mine
public text v1 · immutable<% gallery_ids = G2AlbumItem.find_by_sql("select g_id from g2_AlbumItem") %>
<% for gallery_id in gallery_ids %>
<% @g2_items = G2Item.find_by_sql("select g_title, g_id FROM g2_Item WHERE g_id=#{gallery_id.g_id}") %>
<% end %>
<%= select("Thing", "g_id", @g2_items.collect {|p| [ p.g_title, p.g_id ] }, { :include_blank => false }) %>