On 20 January 2015 at 22:48, 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?

If I understand correctly is it just that you want
Student has many works
Work belongs to student

Or possibly you need a has_and_belongs_to_many between them.

If not then please explain the problem more carefully.  In particular
I don't know what you mean by 'distributed as single works'.

Have you already worked right through a good tutorial such as
railstutorial.org (which is free to use online)?  If not then I
suggest you do that before anything else, it will give you a good
grounding in rails.

Colin

>
> 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/CAL%3D0gLvDYLZrgEeoP9Ksmt1v%3D_5buXvZ%2Bbti9OwyL4A78jDSxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to