Skip to content

Instantly share code, notes, and snippets.

@DakotaLMartinez
Last active November 7, 2020 19:25
Show Gist options
  • Save DakotaLMartinez/4ecb0693c56b5eed67ed76d04f63f1d5 to your computer and use it in GitHub Desktop.
Save DakotaLMartinez/4ecb0693c56b5eed67ed76d04f63f1d5 to your computer and use it in GitHub Desktop.
Rails Project Planning

What is the Many to many relationship and how is it used?

What is the User Submittable attribute on the join model?

What Validations do we need?

How do users fit into the application? How are they related to the other models?

What are our Nested Routes? (We need a nested new route and either a nested index or nested show route)

Do we have Non Nested Versions of those nested routes?

What Scope Method(s) do we have and how are they used?

What does the schema for our app look like?

# table migration for: examples 
# t.string :name
# t.string :etc…
class Example 
	# relationships

	# validations 

	# user submittable attributes (if this is a join model)

	# scope_methods (if any)


end

Project Examples to flesh out:

  • Doctor, Patient and Appointment
  • User, Project, Task
  • Project, Programmer, Assignment
  • Recipe, Ingredient, RecipeIngredient
  • User, Exercise, ExerciseLog
  • User, Topic, Interest
  • User, Medication, Prescription
  • User, Movie, Review
  • Dancer, DanceClass, Enrollments
  • Character, Motivation, Alignment
@HopperMCS
Copy link

HopperMCS commented Nov 7, 2020

@DakotaLMartinez please review, I've started it but need help finishing/making sure this even works to begin with

What is the Many to many relationship and how is it used?

Users <> Libraries through Performance Ratings
library.users && user.libraries - not created, just rated

What is the User Submittable attribute on the join model?

  • Performace Rating

What Validations do we need?

  • Users

    • Username, presence uniq
    • Email - presence, uniq
    • Password - length, presence
  • Libraries

    • Name
    • language_id
    • Link to source
  • Language

    • Name
    • Purpose
    • Compiled/Scripted?
    • Turing complete?
  • Performance Rating

    • Rating
    • Commentary
    • belongs to user, user_id
    • belongs to libraires, library_id

How do users fit into the application? How are they related to the other models?

  • Users can:
    • Add languages
    • Add libraries
    • Add performance ratings to libraries

What are our Nested Routes? (We need a nested new route and either a nested index or nested show route)

languages/language_id/libraries - nested index - shows libraries specific to language_id
languages/language_id/libraries/new - nested new - form to create lib with lang preset

Do we have Non Nested Versions of those nested routes?

/libraries/ - shows all libraries
/libraries/new - form to create lib without preset lang

What Scope Method(s) do we have and how are they used?

  • order by psoitive/negative
  • order by created_at

What does the schema for our app look like?

# table migration for: examples 
# t.string :name
# t.string :etc…
class Example 
	# relationships

	# validations 

	# user submittable attributes (if this is a join model)

	# scope_methods (if any)


end

Project Examples to flesh out:

Doctor, Patient and Appointment
User, Project, Task
Project, Programmer, Assignment
Recipe, Ingredient, RecipeIngredient
User, Exercise, ExerciseLog
User, Topic, Interest
User, Medication, Prescription
User, Movie, Review
Dancer, DanceClass, Enrollments
Character, Motivation, Alignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment