Skip to content

Instantly share code, notes, and snippets.

@dramsay
Created April 6, 2009 15:21
Show Gist options
  • Save dramsay/90796 to your computer and use it in GitHub Desktop.
Save dramsay/90796 to your computer and use it in GitHub Desktop.
<% for data in @other_search %>
<% at = 0 %>
<% for obj in data %>
<% if at == 0 %>
<% new_obj = obj.school.name %>
<% at = at + 1 %>
<% else %>
<% new_obj = obj %>
<% at = at + 1 %>
<% end %>
<%= hidden_field_tag 'query_data[]', new_obj %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment