Skip to content

Instantly share code, notes, and snippets.

@kineticac
Created June 6, 2013 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kineticac/5718410 to your computer and use it in GitHub Desktop.
Save kineticac/5718410 to your computer and use it in GitHub Desktop.
def some_view
@majors = HobsonsMajor.where(id: [@athlete.major1, @athlete.major2, @athlete.major3])
end
<% @majors.each_with_index do |major, index| %>
<div class="span8">
<label>Potential Major #<%= index+1 %></label>
<%= select_tag :first_major_categories,
options_for_select(get_major_categories, major.hobsons_category_id), class: "span8 major_category" %>
<%= a.select "major#{index+1}".to_sym,
options_for_select(get_majors_by_category_id(major.hobsons_category_id), major.id),
{ prompt: "--" }, class: "span8"
%>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment