Skip to content

Conversation

@oliverochman
Copy link
Collaborator

@oliverochman oliverochman commented Sep 12, 2019

User Story

As a User,
In order to use spaced repetition
I would like to be able to save flashcards I clicked red or yellow on.

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

oliverochman and others added 9 commits September 11, 2019 19:56
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'
},
Copy link
Contributor

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

Copy link
Contributor

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?

@dashlykova dashlykova merged commit c249a71 into CraftAcademy:development Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants