Skip to content

Comment on Five Common Rails Mistakesparent

Comments

varchar is an alias for "character varying", which is exactly the same as text.

I use both varchar and text. varchar for things that should be one line (i.e. a username). text for things that might be multiple lines. formtastic will show a html input field for varchar columns and a textarea for text columns.

(of course, you can insert paragraphs into the varchar columns, but it's a form of documentation)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.