02 Sep '12, 12pm

ActiveRecord - Boolean:

Each of the database adapters is responsible for determining how to handle a boolean column in a way that makes sense for their specific backend. In the case of PostgreSQL and OpenBase this is trivial, since these database backends have a boolean type column built-in. For MySQL - as has been pointed out - booleans are usually handled as tinyint. The MySQL adapter therefore will default to handle tinyint columns as booleans. However, this behavior can be changed by setting MysqlAdapter.emulate_booleans = false. If you define your schema within rails and give the column a type of :boolean, then the adapter you are using will create a column of whatever type makes sense for that database, thus achieving (at least to this extent) database agnosticism. Beautiful. Sorta brings a tear to your eye, doesn't it? -Derrick Spell

Full article: http://www.ruby-forum.com/topic/60847

Tweets

ActiveRecord and Azure

rubyflow.com 04 Sep '12, 11am

ActiveRecord and Azure Posted by markoa on September 04, 2012 — 0 comments Here's what you need to know if you find yourse...