After looking at the AR code, I think this can be solved in
SQLiteAdapter::quote. I'm writing up a patch now.
Kev

On 12/21/05, Tobias Luetke <[EMAIL PROTECTED]> wrote:
> maybe we should add connection.false / connection.true methods for
> such things to AbstractAdapter?
>
> On 12/21/05, Kevin Clark <[EMAIL PROTECTED]> wrote:
> > Replacing the defaults with t and f would work for sqlite, but it
> > isn't database agnostic. Is there a way to do it and maintain cross db
> > functionality?
> >
> > On 12/21/05, David Rupp <[EMAIL PROTECTED]> wrote:
> > > Specify a checked_value and unchecked_value in your check_box method
> > > call. Here's the method signature from the API docs
> > > (api.rubyonrails.com):
> > >
> > > check_box(object, method, options = {}, checked_value = "1",
> > > unchecked_value = "0")
> > >
> > > So you could replace the defaults of "1" and "0" with "t" and "f",
> > > for example.
> > >
> > > Regards,
> > > David
> > >
> > > On Dec 21, 2005, at 1:55 PM, Kevin Clark wrote:
> > >
> > > > I'm working on an application using sqlite locally and recently
> > > > noticed that checkboxes are evaluating to 1 and 0 (not true and false)
> > > > and thus aren't being sanitized to boolean values in the db ('t' and
> > > > 'f' in sqlite). This isn't a problem in mysql because 1 and 0 are
> > > > synonymous to true and false, but there's issues for some.
> > > >
> > > > Is this a bug? Is there some way around it that I've missed somewhere?
> > > >
> > > > Kev
> > > > _______________________________________________
> > > > Rails-core mailing list
> > > > [email protected]
> > > > http://lists.rubyonrails.org/mailman/listinfo/rails-core
> > >
> > > _______________________________________________
> > > Rails-core mailing list
> > > [email protected]
> > > http://lists.rubyonrails.org/mailman/listinfo/rails-core
> > >
> > _______________________________________________
> > Rails-core mailing list
> > [email protected]
> > http://lists.rubyonrails.org/mailman/listinfo/rails-core
> >
>
>
> --
> Tobi
> http://jadedpixel.com    - modern e-commerce software
> http://typo.leetsoft.com - Open source weblog engine
> http://blog.leetsoft.com - Technical weblog
>
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to