<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Ruby on Rails Error</title>
	<link>http://corralesonline.com/ruby-on-rails-error-2/2007/07/04/</link>
	<description>corralesonline.com</description>
	<pubDate>Fri, 10 Sep 2010 04:18:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: brian.corrales</title>
		<link>http://corralesonline.com/ruby-on-rails-error-2/2007/07/04/#comment-587</link>
		<dc:creator>brian.corrales</dc:creator>
		<pubDate>Thu, 05 Jul 2007 02:10:47 +0000</pubDate>
		<guid>http://corralesonline.com/ruby-on-rails-error-2/2007/07/04/#comment-587</guid>
		<description>Thanks Jimmy.  I'll have to start using the prepared statement then.</description>
		<content:encoded><![CDATA[<p>Thanks Jimmy.  I&#8217;ll have to start using the prepared statement then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy Zimmerman</title>
		<link>http://corralesonline.com/ruby-on-rails-error-2/2007/07/04/#comment-586</link>
		<dc:creator>Jimmy Zimmerman</dc:creator>
		<pubDate>Thu, 05 Jul 2007 02:06:16 +0000</pubDate>
		<guid>http://corralesonline.com/ruby-on-rails-error-2/2007/07/04/#comment-586</guid>
		<description>A better way to do it is the prepared statement type syntax. Your conditions statement would look something more like:

:conditions =&#62; ["common_given_names.name LIKE ?", "#{params[:descendant][:given_name]}%"]

That way, Rails will sanitize your input from any kind of SQL injection attack, as well as wrap the single quotes around your statement if needed.</description>
		<content:encoded><![CDATA[<p>A better way to do it is the prepared statement type syntax. Your conditions statement would look something more like:</p>
<p>:conditions =&gt; [&#8221;common_given_names.name LIKE ?&#8221;, &#8220;#{params[:descendant][:given_name]}%&#8221;]</p>
<p>That way, Rails will sanitize your input from any kind of SQL injection attack, as well as wrap the single quotes around your statement if needed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
