The clever version wasn’t much shorter

and confused codeclimate into thinking it was an sql injection vector