From f2c4bfbca7ae426ad01513b68c851d49d6daa0f7 Mon Sep 17 00:00:00 2001 From: Justin Collins Date: Mon, 14 May 2012 09:27:05 -0700 Subject: [PATCH] CheckSQL: Test that calls to #to_i do not warn --- test/apps/rails3.1/app/models/product.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/apps/rails3.1/app/models/product.rb b/test/apps/rails3.1/app/models/product.rb index dab7e2fb..484f5ff6 100644 --- a/test/apps/rails3.1/app/models/product.rb +++ b/test/apps/rails3.1/app/models/product.rb @@ -106,6 +106,10 @@ class Product < ActiveRecord::Base Product.last("blah = '#{something(params[:blah])}'") end + def test_params_to_i + #Should not warn + Product.last("blah = '#{params[:id].to_i}'") + end def test_more_if_statements if some_condition -- GitLab