クエリをインジェクションから安全にするために、アクティブレコードを使用してこのクエリを実行したいと思います。DBはPostgresqlです。Ruby on Rails 3.2.11
 def find_possible_duplicates(last_name, date_of_birth, organisation_id)
    find_by_sql( 'select c.* from clients c' +
                 ' join locations l on c.location_id = l.id' +
                 " where c.last_name ILIKE #{last_name}" +
                 " and c.date_of_birth = #{date_of_birth}" +
                 " and l.organisation_id = #{organisation_id}" 
 end        
助けていただければ幸いです