Coder Social home page Coder Social logo

Unable to make new users about nku HOT 5 CLOSED

Spartan-196 avatar Spartan-196 commented on September 1, 2024
Unable to make new users

from nku.

Comments (5)

jaimerump avatar jaimerump commented on September 1, 2024

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.

from nku.

Sparkesg1 avatar Sparkesg1 commented on September 1, 2024

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

from nku.

mitchlloyd avatar mitchlloyd commented on September 1, 2024

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.

from nku.

Spartan-196 avatar Spartan-196 commented on September 1, 2024

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

from nku.

Spartan-196 avatar Spartan-196 commented on September 1, 2024

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.

from nku.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.