If you want rails to track the number of records a has_many relationship has, what is the syntax
in the master table add a field with xxxx_count where xxx is the name of the has_many table and :counter_cache => true to the belongs_to
ex: if the learner
has_many :flashcards
then you add flashcards_count to the learner table and in the flashcard model
belongs_to :learner, :counter_cache=>true
Memory Work Out Sessions use brain research to accelerate and improve memorization. Automatically scheduled daily review drills ensure sure you don't forget.
![]() |
Use the Memorization Tool | ||
![]() |
Create Flashcards | ||
![]() |
Building a learning community | ||
![]() |
Create a lesson to teach others | ||
![]() |
See all help topics | ||
![]() |
Suggestions, gripes or feedback |