I’m making a new web app using Rails, and was wondering, what’s the difference between string and text? And when should each be used?
I’m making a new web app using Rails, and was wondering, what’s the difference
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The difference relies in how the symbol is converted into its respective column type in query language.
Reference:
When should each be used?
As a general rule of thumb, use
:stringfor short text input (username, email, password, titles, etc.) and use:textfor longer expected input such as descriptions, comment content, etc.