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 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.