Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.