Skip to content

Commit e6c1995

Browse files
committed
Name index case-insensitive
1 parent 2404a44 commit e6c1995

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

app/controllers/names_controller.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ def index(opts = {})
7070
opts[:rank] = params[:rank] if params[:rank].present?
7171

7272
opts[:status] ||=
73-
case @status
73+
case @status.to_s.downcase
7474
when 'public'; Name.public_status
7575
when 'automated'; 0
76-
when 'SeqCode'; 15
77-
when 'ICNP'; 20
78-
when 'ICNafp'; 25
76+
when 'seqcode'; 15
77+
when 'icnp'; 20
78+
when 'icnafp'; 25
7979
when 'valid'; Name.valid_status
8080
end
8181

8282
@names ||=
83-
case @sort
83+
case @sort.to_s.downcase
8484
when 'date'
8585
if opts[:status] == 15
8686
Name.order(validated_at: :desc)

0 commit comments

Comments
 (0)