title: Rails Devise PG::SyntaxError: ERROR: zero-length delimited identifier at or near """"
body: <p>I'm trying to add a new devise model. When I use the sign_up path I'm able to create a user but throws an error after the new user (doctor) is saved. The error isn't very helpful so I'm hoping someone could point me in the right direction for debugging. </p>
  
  <p>The error is <code>ActiveRecord::StatementInvalid in Devise::RegistrationsController#create</code></p>
  
  <p><code>PG::SyntaxError: ERROR: zero-length delimited identifier at or near """" LINE 1: ...in_ip" = $4, "sign_in_count" = $5 WHERE "doctors"."" IS NULL ^ : UPDATE "doctors" SET "current_sign_in_at" = $1, "current_sign_in_ip" = $2, "last_sign_in_at" = $3, "last_sign_in_ip" = $4, "sign_in_count" = $5 WHERE "doctors"."" IS NULL</code></p>
  
  <p>My schema is </p>
  
  <pre><code>create_table "doctors", id: false, force: true do |t|
      t.string   "email",                  default: "", null: false
      t.string   "encrypted_password",     default: "", null: false
      t.string   "reset_password_token"
      t.datetime "reset_password_sent_at"
      t.datetime "remember_created_at"
      t.integer  "sign_in_count",          default: 0,  null: false
      t.datetime "current_sign_in_at"
      t.datetime "last_sign_in_at"
      t.string   "current_sign_in_ip"
      t.string   "last_sign_in_ip"
    end
  
    add_index "doctors", ["email"], name: "index_doctors_on_email", unique: true, using: :btree
    add_index "doctors", ["reset_password_token"], name: "index_doctors_on_reset_password_token", unique: true, using: :btree
  </code></pre>
  
  <p>where should I be looking to debug this? I'm trying to debug the devise controller but I can't find it. </p>
  
  <p>Thanks. </p>