Joined August 2012
·

Arthur Chang

CEO at Priime
·
San Francisco, CA
·
·
·

@rshetty
When rails serializes the object for you into a string (via yaml), the chances that the string exceeds the character limit of a :string type column is very high. That is why you need :text. If you serialize an object that doesn't ever exceed the :string boundaries, you probably don't need to serialize it in the first place.

If you mean important reasons for serializing, that's really just up to application logic. It's not really needed that much, and usually you can split it up into a table instead, but I had a very specific need for it.

Hope that helps!

Achievements
668 Karma
146,913 Total ProTip Views