Skip to content

Commit

Permalink
case insensitive search
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Jun 16, 2018
1 parent aa383e0 commit 20f9918
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

source 'https://rubygems.org'
ruby '2.3.7'

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/matches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def future
end

def country
@team = Team.where(fifa_code: params['fifa_code']).first
@team = Team.where(fifa_code: params['fifa_code']&.upcase).first
@matches = ordered_class.where("home_team_id = ? OR away_team_id = ?", @team.id, @team.id)
render 'index.json.rabl', callback: params['callback']
end
Expand Down

0 comments on commit 20f9918

Please sign in to comment.