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

Ruby on Rails Quiz: Scaffolding and Test Modification

In the Scaffolding and Test Modification Quiz, part of the Advanced Social Features in Ruby on Rails, I came across this question, and the system says the answer is true. I'm inclined to disagree. I'm either really not awake yet, misreading something, or this needs to be corrected:

Scaffolding always generates all necessary code for a part of an application and needs no modification.

In any case, if the question is correct, it's still confusing. If I'm wrong, could someone explain it to me?

James Barnett
James Barnett
39,199 Points

Please edit your post with a link to quiz in question

1 Answer

I think what is meant by the phrasing is something like

rails g scaffold Post title:string

provides the minimum amount of code needed to perform basic CRUD actions for a given model. For example, without a scaffold flag-

rails g model Post title:string  

would still require the controller and views to be setup not "...generating all necessary code..to work"