NoMethodError in Public::Users#show

schema.rb

1# This file is auto-generated from the current state of the database. Instead 2# of editing this file, please use the migrations feature of Active Record to 3# incrementally modify your database, and then regenerate this schema definition. 4# 5# This file is the source Rails uses to define your schema when running `bin/rails 6# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to 7# be faster and is potentially less error prone than running all of your 8# migrations from scratch. Old migrations may fail to apply correctly if those 9# migrations use external dependencies or application code. 10# 11# It's strongly recommended that you check this file into your version control system. 12 13ActiveRecord::Schema.define(version: 2024_01_06_074412) do 14 15 create_table "active_storage_attachments", force: :cascade do |t| 16 t.string "name", null: false 17 t.string "record_type", null: false 18 t.bigint "record_id", null: false 19 t.bigint "blob_id", null: false 20 t.datetime "created_at", null: false 21 t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" 22 t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true 23 end 24 25 create_table "active_storage_blobs", force: :cascade do |t| 26 t.string "key", null: false 27 t.string "filename", null: false 28 t.string "content_type" 29 t.text "metadata" 30 t.string "service_name", null: false 31 t.bigint "byte_size", null: false 32 t.string "checksum", null: false 33 t.datetime "created_at", null: false 34 t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true 35 end 36 37 create_table "active_storage_variant_records", force: :cascade do |t| 38 t.bigint "blob_id", null: false 39 t.string "variation_digest", null: false 40 t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true 41 end 42 43 create_table "admins", force: :cascade do |t| 44 t.string "email", default: "", null: false 45 t.string "encrypted_password", default: "", null: false 46 t.string "reset_password_token" 47 t.datetime "reset_password_sent_at" 48 t.datetime "remember_created_at" 49 t.datetime "created_at", precision: 6, null: false 50 t.datetime "updated_at", precision: 6, null: false 51 t.index ["email"], name: "index_admins_on_email", unique: true 52 t.index ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true 53 end 54 55 create_table "books", force: :cascade do |t| 56 t.string "star" 57 t.datetime "created_at", precision: 6, null: false 58 t.datetime "updated_at", precision: 6, null: false 59 end 60 61 create_table "post_comments", force: :cascade do |t| 62 t.text "comment" 63 t.integer "user_id" 64 t.datetime "created_at", precision: 6, null: false 65 t.datetime "updated_at", precision: 6, null: false 66 t.integer "post_image_id" 67 t.integer "post_id" 68 end 69 70 create_table "post_images", force: :cascade do |t| 71 t.datetime "created_at", precision: 6, null: false 72 t.datetime "updated_at", precision: 6, null: false 73 end 74 75 create_table "post_tag_relations", force: :cascade do |t| 76 t.integer "post_id", null: false 77 t.integer "tag_id", null: false 78 t.datetime "created_at", precision: 6, null: false 79 t.datetime "updated_at", precision: 6, null: false 80 t.index ["post_id"], name: "index_post_tag_relations_on_post_id" 81 t.index ["tag_id"], name: "index_post_tag_relations_on_tag_id" 82 end 83 84 create_table "posts", force: :cascade do |t| 85 t.string "book_title" 86 t.text "caption" 87 t.integer "user_id" 88 t.datetime "created_at", precision: 6, null: false 89 t.datetime "updated_at", precision: 6, null: false 90 t.string "star" 91 end 92 93 create_table "reviews", force: :cascade do |t| 94 t.string "star" 95 t.string "review_star" 96 t.datetime "created_at", precision: 6, null: false 97 t.datetime "updated_at", precision: 6, null: false 98 t.integer "post_id" 99 end 100 101 create_table "tags", force: :cascade do |t| 102 t.string "name" 103 t.datetime "created_at", precision: 6, null: false 104 t.datetime "updated_at", precision: 6, null: false 105 end 106 107 create_table "users", force: :cascade do |t| 108 t.string "email", default: "", null: false 109 t.string "encrypted_password", default: "", null: false 110 t.string "reset_password_token" 111 t.datetime "reset_password_sent_at" 112 t.datetime "remember_created_at" 113 t.string "name", null: false 114 t.datetime "created_at", precision: 6, null: false 115 t.datetime "updated_at", precision: 6, null: false 116 t.integer "failed_attemps", default: 0, null: false 117 t.string "unlock_token" 118 t.datetime "locked_at" 119 t.string "profile_image" 120 t.text "post_comment" 121 t.index ["email"], name: "index_users_on_email", unique: true 122 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true 123 t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true 124 end 125 126 add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" 127 add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" 128 add_foreign_key "post_tag_relations", "posts" 129 add_foreign_key "post_tag_relations", "tags" 130end 131

コメントを投稿

0 コメント