On Jan 20, 2015, at 5:48 PM, Jacob Grishey <jgris...@gmail.com> wrote:
> Hi, I know this is probably a basic question but I am relatively new to Ruby > on Rails. > > I have a website in which I have three models: courses, students, and works. > The website is supposed to be a grade keeper. A course has many works, like a > test. You can add a work to a course, but I want that work to be distributed > as single works to each student in that course as well. Does anyone know how > I would be able to do this? > This feels like it's lacking another model. I did a system where there were quizzes after a medical Continuing Education presentation, and there was the following setup: User (has_many examinations) Examination (belongs_to user, belongs_to test) [also stores the individual's answers to each question] Test (has_many examinations) I won't get into the questions and answers here, but this should give you a possible direction. The idea is that a Test is a template -- the mimeograph master if you go back that far. There are many examinations derived from that test, and each examination is referencing a single user and a single test (master). How that exam gets filled out is unique to the user, and I think that's the missing model you are looking for. Walter > Thank you in advance, > > Jacob Grishey > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/80495e07-97d8-4ff3-94da-a4fbebea3738%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5607DC8F-EE11-4DD1-8E0D-F17A299FC7C7%40wdstudio.com. For more options, visit https://groups.google.com/d/optout.