Created
June 29, 2011 03:04
-
-
Save plasticine/1052887 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li> | |
<% editors = Editor.all() %> | |
<select class="<%= (editors.map(&:id).include?(params[:id].to_i)) ? 'active' : '' %>"> | |
<option value="">filter</option> | |
<option value="everyone">everyone</option> | |
<% editors.sort_by(&:friendly_name).each do |editor| %> | |
<option value="<%= editor.id %>" <%= (params[:id] == "#{editor.id}") ? 'selected' : '' %>><%= editor.friendly_name %></option> | |
<% end %> | |
</select> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment