[Rails] Bind Variables in Active Record
Dave Thomas
pragdave at gmail.com
Tue Dec 7 06:47:24 GMT 2004
On Dec 6, 2004, at 18:34, Michael Koziarski wrote:
> OK, I have some basic functionality to support bind variables, it
> appears to work with the 'old' %s style too.
>
> I've altered sanitize_conditions in
> activerecord/lib/active_record/base.rb to check whether bind variables
> are in the statement (/\?/). If they are, replace all the ?s to
> escaped values from the arguments array. else santize and expand.
Maybe I'm misunderstanding--in what way is this different to using %s
everywhere?
Cheers
Dave
More information about the Rails
mailing list