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

Rails apps w/o scaffold.

Hey guys,

I was wandering if anyone had any advice on how to build Rails apps without a scaffold? The Ruby tutorials are great and have been a lot of help but no real Rails developer uses scaffolds all the time right? I feel like a Rails developer who uses scaffolds is like an adult who has been riding a bike all their life and still uses training wheels.

I'm already using the Rails Documentation and wanted to know what else is good?

3 Answers

Neil Northrop
Neil Northrop
5,095 Points

Do you mean like this?

rails generate model Hamburger

or this:

rails generate controller Hamburger

Those two commands are the equivalent of your single Rails generate scaffold command.

Could you please have a tutorial on creating a Rails app without scaffold?

Michael Williams, Neil is right here. I use generators constantly. You're right that scaffolds are nice training wheels, but it's nice to know your way around the generators and what they do for you. This "Getting Started" guide will get you the basics for working with generators.

Yeah, I'm already using the "Getting Started" guide and it is giving me a majority of what I need. I like the easy set up and quickness of a scaffold but wanted to know more about what's under the hood.

Thanks for the tips!

Neil Northrop
Neil Northrop
5,095 Points

Hey Michael, some of the best reading I've done is in the terminal using the command's help docs.

If you type:

rails generate

or:

rails generate model

or:

rails generate controller

You'll get some examples. Hope that helps some more.