This image has the correct terminology: http://dl.dropbox.com/u/766146/ruby-on-rails-data-relationships.png
You will want to implement the last one with a enrollment model which will give you date of enrollment, etc. Even if you don't fill it yet, is useful to have. Otherwise you can put has and belongs to many on each model. (not covered in the picture) Ankur On Mar 29, 9:25 am, Quiliro Ordóñez <[email protected]> wrote: > El 29/03/11 08:06, simple_n00b escribi : > > > It sounds as though You may be defining the relationship as a course > > "has many" students, and student "belongs to" course. > > It might be that you need a "has many through", or "has and belongs to > > many" > > because each student has many courses, but each course also has many > > students. > > Thank you for your input. I am sorry I did not specify the > relationships. They are: > > one course has many students > one student has only one course > > So what I did was include: > > has_many :students (on the course model) > belongs_to :course (on the student model) > > What I need is to find a student and then show what course he is taking > and what course he should take after that one. > -- > Quiliro Ord ez > 09 821 8696 > 02 340 1517 -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
