title: prevent sql injection in rails
body: <p>I am using the following query to find nearest locations google maps. Is it immune to the Sql injection. If not can anyone help me to get rid of it.</p>
  
  <pre><code>AlphaCourses.find_by_sql("SELECT *,(  6371 * acos( cos( radians( #{@latitude} ) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians( #{@longitude} ) ) + sin( radians( #{@latitude} ) ) * sin( radians( latitude ) ) ) ) AS distance FROM alpha_courses HAVING distance &lt;= #{@radius} ORDER BY distance LIMIT 200")
  </code></pre>
  
  <p>Thanks in advance.</p>