All threads / encounterd some problems with devise.

Ask A Question

Notifications

You’re not receiving notifications from this thread.

encounterd some problems with devise.

sameer asked in Ruby

1.when i created a devise model , i saw encrypted_password(column) in schema.rb but in registration form i saw f.input :password ???????
2.I am getting { PG::NotNullViolation: ERROR: null value in column "name" violates not-null constraint DETAIL: Failing row contains (4, [email protected], $2a$11$uubT/gQenNfwoJXYeqaYNea9qsG/oWMZ4GnhCbhJkal3.ky2J0RSa, null, null, null, null, null, null, null, null, null, 2019-02-18 09:38:53.848679, 2019-02-18 09:38:53.848679). : INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" } . i dont get it at all .... i have done database validation by putting null: falser where it might go wrong.
I am kind of beginner in ruby on rails please be kind with me and help me grow.. Thank you :p

PG::NotNullViolation: ERROR: null value in column "name" violates not-null ...

You're probably not adding the name. In your migration you may have that the value cannot be null.

i checked my tables column in console all column were present ...... and even in schema the columns are present do i have to send params by those name somewhere ....

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,399+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.