-
Notifications
You must be signed in to change notification settings - Fork 3
User can get saved flashcards #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User can get saved flashcards #11
Conversation
Co-authored-by: julieahlquist <julieahlquist@hotmail.com> Co-authored-by: dashlykova <daria.lykova@gmail.com>
Co-authored-by: julieahlquist <julieahlquist@hotmail.com> Co-authored-by: dashlykova <daria.lykova@gmail.com>
Co-authored-by: julieahlquist <julieahlquist@hotmail.com> Co-authored-by: dashlykova <daria.lykova@gmail.com>
Co-authored-by: julieahlquist <julieahlquist@hotmail.com> Co-authored-by: dashlykova <daria.lykova@gmail.com>
Co-authored-by: julieahlquist <julieahlquist@hotmail.com> Co-authored-by: dashlykova <daria.lykova@gmail.com>
| get "/api/saved_flashcards", | ||
| params: { | ||
| status: 'yellow' | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this work? how is both cards w red and yellow status sent off?
| @@ -0,0 +1,8 @@ | |||
| class SavedFlashcard < ApplicationRecord | |||
| validates_presence_of :user, :flashcard | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it have to be validated by question and answer as well or is that enough to do on the flashcard model?
User Story
Feature description
Link to this [feature/chore in Pivotal Tracker].
Description of PR
Creates a save_flashcard model & makes it save flashcards the user choses by clicking on a red & yellow buttons
What did we learn?
Learned about join tables and has_many through associations