On Jul 27, 5:45 pm, Greg Willits <[email protected]> wrote: > I had a working 1.2 app which I have just updated to 2.3.2 -- mostly > seems good so far, but the Rails technique for booleans is acting up. > > MySQL column = `childSensitiveCase` varchar(1) NOT NULL default '0'
as long as I remember, with mysql rails expects booleans to be tinyint columns Fred > > If I use a simple debug() output, I get this: > > debug(@child.isSensitiveCase) # --> "0" > debug(@child.isSensitiveCase?) # --> true > > change the value in the db to 1 > > debug(@child.isSensitiveCase) # --> "1" > debug(@child.isSensitiveCase?) # --> true > > change the value in the db to F or f and it is still resolving to true. > > The code worked just fine in 1.2 > > Has something else changed since 1.2 in handling booleans? > > -- gw > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

