Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Generate a Scaffold

Once that I created the scaffold, how can I change "title:string" and "description:text" ?

Once that I created the scaffold, how can I change "title:string" and "description:text" (if it is possible )?

5 Answers

Shreyash Agarwal
Shreyash Agarwal
9,843 Points

I found this information here, I was curious about the same thing!


Hopefully, you've understood a little bit about models, and how they are meant to act as data encapsulators. Happy to share it! Here's what you're looking for-

a model can have attributes (properties) represented by columns in the corresponding database table. To be supported by the Active Record system, these attributes must conform to a list of appropriate types:

:binary - stores data such as images, audio files or movies

:boolean - stores true or false values (such as whether a particular user is an administrator of an application or not)

:date - stores only a date (year, month, day)

:datetime - stores both a date and a time

:decimal - stores decimal numbers with precision that varies according to your specifications

:float - stores decimal points with fixed precision i.e. you can’t specify the precision (:decimal is better for mathematical operations in which precision is required, but :float is processed faster and is better in situations where speed is required and accuracy is secondary)

:integer - stores whole numbers

:primary_key - the primary key of a table is assumed to be the id

:string - stores 255 characters of text information, i.e. is used for short text fields (names, emails etc)

:text - stores text information with no character limit (used for comments, blog posts etc)

:time - stores only a time

Listen to paragraph :timestamp - stores both a time and date. :timestamp is different from :datetime and serves a different purpose, but there’s no need to go into that here

Shreyash Agarwal
Shreyash Agarwal
9,843 Points

I'm going to have Java in my 3rd year, which starts from August, so i'm picking it up anyway. I am interested in android development, but knowing java gives a better better of how javascript works i think! I'm really good with c++, so java seems simple in the treehouse course here...

And yes, I am interested in solid front end web services :D

Thank you Shreyash! Nice guide indeed! Now I'm studying on "Beginning Rails 4" written by Adam Gamble. It is a great book that covers the entire framework and it gives you a solid knowledge of the structure of ActiveRecord. Once read, I'll continue this tutorial! I suggest everyone interested in Rails study to give it a shot! ;)

Shreyash Agarwal
Shreyash Agarwal
9,843 Points

Thanks Andrea for the recommendation! I've put Ruby (and Rails) on hold for a while as I'm learning Java so that I can start working well with Javascript, as I'm more interested in front-end. I plant to learn Node.js after that.


I studied Java while I was attending engineering courses, I think if you want to do front-end development studying java could be a not necessary struggle (unless you want to go android native development ). Although the name is similar, Java and Javascript are really different. I would avoid Java unless you want to develop solid web services ;)