Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Unable to make new users #49

Closed
Spartan-196 opened this issue Feb 8, 2014 · 5 comments
Closed

Unable to make new users #49

Spartan-196 opened this issue Feb 8, 2014 · 5 comments

Comments

@Spartan-196
Copy link

I think I missed a step in my migrates and making passwords and so fourth because when I try to make a user I get a lovely undefined password_digest message
all changes have been commited to my github.

Students page is here (http://atkinsonj3-72805.use1.nitrousbox.com/students) if you want to see it yourself

but it looks kind of like this
password_digest

@jaimerump
Copy link

That's because in your students table in the database you need a column called password_digest. Has_secure_password automatically takes the password field from the form, and password_confirmation if you're setting the password, and generates the password_digest for you.

@Sparkesg1
Copy link

On top of super jaime being correct again, you won't be able to call (student_params) as it is defined under private.

@mitchlloyd
Copy link
Contributor

Just for the record, I'm not seeing any issue with student_params in your controller. Defining it as a private method is the right thing to do here because you are only calling it from within the controller.

@Spartan-196
Copy link
Author

Thanks @mitchlloyd I had intended to leave it in a private class as I don't want it callable by anything else

@Spartan-196
Copy link
Author

It seems I had everything in place aside from in the database itself. I ended up dumping the db and remaking it then migrating everything. I am now able to add users and log users in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants