liam
Joined 4/12/2021
liam said about 3 years ago on Friend Requests From Scratch :
 Here's my relevant schema code:
create_table "connections", force: :cascade do |t|
    t.integer "user_id", null: false
    t.integer "contact_id", null: false
    t.integer "status", limit: 1, default: 0
    t.datetime "created_at", precision: 6, null: false
    t.datetime "updated_at", precision: 6, null: false
    t.index ["contact_id"], name: "index_connections_on_contact_id"
    t.index ["user_id"], name: "index_connections_on_user_id"
  end

create_table "users", force: :cascade 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.datetime "created_at", precision: 6, null: false
    t.datetime "updated_at", precision: 6, null: false
    t.boolean "admin", default: false
    t.index ["email"], name: "index_users_on_email", unique: true
    t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
  end

  add_foreign_key "connections", "contacts"
  add_foreign_key "connections", "users"
end

and the connections migration, if it helps:

class CreateConnections < ActiveRecord::Migration[6.1]
  def change
    create_table :connections do |t|
      t.references :user, null: false, foreign_key: { to_table: :users}
      t.references :contact, null: false, foreign_key: {to_table: :users}
      t.integer :status, default: 0, limit: 1

      t.timestamps
    end
  end
end

I tried to edit the migration as above based on comments made by marketing. I just directly edited the file, I wasn't sure if I needed to run a new migration. From what I've read on stack overflow and other places, the error I'm getting seems to be something to do with the migrations.

liam said about 3 years ago on Friend Requests From Scratch :
 But are the migration changes necessary from what you can see? Or do I need to send you through some more code? The project is deployed on GitHub but it's only a dummy app to test code before making larger, nice changes in the real repository (I know it seems unnecessary but it helps give a lot more room for error).

liam said about 3 years ago on Friend Requests From Scratch :
Hi   , just wondering if you had a chance to take a look at it this week? I'm still stuck! I made a stack overflow post that has had no traction yet:
https://stackoverflow.com/questions/67171189/activerecordstatementinvalid-sqlite3sqlexception-no-such-table-main-conta

I'll have a bit more of a sift through all the code that you have in the other tab here to see if there are any other major discrepancies. 

liam said almost 3 years ago on Form Wizards from Scratch :
Hey  , this is great, thanks very much!

One quick question - if I wanted to use the form data as search parameters, how would I tweak it at the end of the form to do this?

EDIT: I'm also struggling to render the first step of my form from my root index, since it's not a _partial. I tried creating a partial to render but then the submit/continue to step 2 doesn't work.

liam said about 2 years ago on Capturing Signatures with Signature Pad :
You haven't seemed to cover everything that you actually did in setting this up. What's the story with the signature.js file in the vendor folder? It's not in your show notes and you didn't even cover it in the video. Couldn't even get the JS to work, let alone integrating it with an actual Rails MVC structure.