In rails 2, you can use ActiveRecord::ConnectionAdapters::Column.value_to_boolean("0") for 1,0,'true','false','1','0', 't', and 'f'.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
ActiveRecord::ConnectionAdapters::Column value_to_boolean(value) does not return a boolean value. | 1 | 154 | September 3, 2010 | |
Suggestion for improving value_to_boolean column conversion | 2 | 142 | May 31, 2010 | |
Custom Boolean Definition | 1 | 93 | December 20, 2007 | |
my number column returns boolean values | 2 | 208 | August 3, 2007 | |
ActiveSupport could add a boolean conversion method to String and Fixnum | 8 | 1472 | April 4, 2016 |