>
> You probably want:
>
>  Sequel::Model.plugin(:boolean_readers){|c| db_schema[c][:db_type]
> =~ /\Atinyint/}
>

Beautiful, thanks!

> If you turn convert_tinyint_to_bool = false, then the :type will
> be :integer, so the boolean_readers plugin will not consider the
> column as a boolean.  You need to use the block to configure it to do
> so.

And very clearly explained. Thanks again!

> This example is included in the documentation:
> http://sequel.rubyforge.org/rdoc-plugins/classes/Sequel/Plugins/BooleanReaders.html

Yes, I read (and re-read) this. So, clearly I'm slow or clarity is in
the eye of the beholder :).

For newbs like myself it is easy to read "By default, the accessors
are created for all columns of type :boolean" without making the
connection, like you pointed out, that said columns won't BE :boolean
after disabling convert_tinyint_to_bool.

So, hopefully my folly and your helpful response will go into the
archives and help some other sequel newbie be un/less-confused.

-- 
Kendall Gifford
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to