Skip to content

Instantly share code, notes, and snippets.

@jelaniwoods
Created May 20, 2022 18:17
Show Gist options
  • Save jelaniwoods/8aad99480781c95409eb9f679a67f3c2 to your computer and use it in GitHub Desktop.
Save jelaniwoods/8aad99480781c95409eb9f679a67f3c2 to your computer and use it in GitHub Desktop.

AD1 Day 8

  • Lab time to catch up

    • a lot of students are in different spots, and so rather than demo part of msm-signin you can watch this recording
  • can work on msm-signin

  • start on assigned final project

  • BEFORE THAT though

    • I know some of you are very eager to work on in-class assignment or the final
    • I want to demo and introduce something that will, hopefully, be VERY HELPFUL to you in any future project
    • as well as, demo how to get started with your own idea
  • I wrote up a quick project in firstdraft—

    • like offer up we did before
    • 2 sided markey

Idea in gitpod

  • starting from scratch
    • bin/server shows nothing
  • use model generator
    • creates the model file
    • creates the migration file
      • this creates the tables in the db
  • verify in rails/db
    • what is the next step?
    • adding an interface
  • define all 5 routes
    • do it by hand
    • if I need more routes for another table, I can cp paste
    • this should be pretty familiar—
    • we’re written this,
    • we’ve debugged it,
    • we’ve chopped and screwed it
    • flipped it and reversed it
  • draft:resource
    • conventions
  • generators
    • they just write the code for you really fast—
    • you have to be ready and comfortable changing it
    • rails really spear-headed including generators in programming frameworks
  • coming up with the data model is the hard part
    • the starting code is pretty boilerplate—
    • then the work is to make it better
  • firstdraft co-pilot
    • it’s hard to write generator cmd in the cmd line, typos
      • can’t use your mouse really
    • it gives you the:
      • generators to cp/paste
      • associations (try typing this out by hand)
      • validations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment