所以,我有一个朋友帮助我让 Omniauth-twitter 工作。但是,现在我遇到了严重的问题。为了让 Omniauth 正常工作,我们必须将 users 表上的 primary_key 更改为 :uid 而不是 :id。不知何故,这影响了歌曲。
例如,现在当我搜索歌曲时,我收到以下错误:
ActiveRecord::RecordNotFound (Couldn't find all Songs with IDs (7, 9, 10, 18, 44, 46, 47, 55) (found 4 results, but was looking for 8)):
请让我知道我可以提供什么代码来帮助解决这个问题。
用户表(模式片段)
create_table "users", id: false, force: true do |t|
t.integer "id", null: false
t.string "email", default: ""
t.string "encrypted_password", default: ""
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "admin"
t.string "provider"
t.string "uid", null: false
t.string "username"
end