Let me see if this is somehow easy. I have columns in my MySQL database set as 'text' ( double checked, they're not accidentally set to the wrong thing). I'm trying to Marshal some data for a special need in the program. Whenever I save this, though, the data (ie the resulting string after marshal) gets chopped to no more than 255 characters. Has there ever been an issue with MySQL doing that or maybe rails thinking it's the wrong type?
I managed to fix it by converting the text fields to 'blob' data types, but it's still weird and I'd love to know why.
def matchattributes self[:matchattributes] ? Marshal.load(self[:matchattributes]) : end def matchattributes=(x) self[:matchattributes] = Marshal.dump(x) end