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 User Authentication with Rails Password Hashing and Sign In Creating the User model: Part 2

Ana Sosa
Ana Sosa
4,496 Points

Didn`t create spec files

When I wrote the code to generate the scaffold user in the previous video, didn't create the spec files, and in this video he code in this files for example in user_spec.rb. What suppose to I need to do?

1 Answer

Daniel Cunningham
Daniel Cunningham
21,109 Points

It's a little more work, but you can just create the files in the correct folders and copy in the relevant code. Go to the correct folder and create a text file and save it as "user_spec.rb". Replicate the code at the top of the file. Scaffolding is just an 'automated' way of creating the files that you need in the right folders. This could be done by creating all the files manually and applying the appropriate coding to each file, but given that we're all new to Rails, it's easier to utilize the rails commands to get things started.