Skip to content

Commit

Permalink
remove disabled categories from filter list
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Feb 1, 2024
1 parent 705996d commit 484cb8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/problems/_filters.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<div class="col col-sm-6 col-md-4">
<label><%= t(".category") %></label>
<select name="category[]" class="form-select" multiple=true>
<% Problem::CATEGORIES.each do |cat| %>
<% Problem::CATEGORIES.
select { |x| Problem::DEFAULT_SEVERITIES[x].present? }.
each do |cat| %>
<option
value="<%= cat %>"
<%= "selected" if params[:category]&.include?(cat.to_s) %>
Expand Down

0 comments on commit 484cb8c

Please sign in to comment.