← Back to bounties
$5

Add a test case to the safe_query gem

Created by Peter Cai

safe_query is a library designed to raise exceptions when potentially unsafe queries are executed via ActiveRecord. To ignore a false positive, the docs recommend converting the relation to an array first before trying to iterate over the results.

The tests (written in rspec) don't cover this case, so a PR addressing this issue should specifically cover the case where converting to an array with `to_a` does not raise an exception when it normally would