 <p>You have to use the same string replacement as with AR find</p> <p><code>Listing.find_by_sql(["SELECT * FROM listings WHERE industry = ?", @user_industry])</code></p> <p><a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html#method-c-find_by_sql">API documentation</a></p>