[Rails] Defining Relationship ( Many to Many) for 3 Models in Rails
I have three models in Rails as : Curriculum, Grade and Topics.
The relationship scenario is like :
Curriculum 'International Baccalaureate(IB)' in grade '6' has_many Topics ( t1,t2,t3 and CompareFraction)
Curriculum 'CBSE' in grade '5' has_many Topics (t1,t2,t4,t5 and CompareFraction) [ A Topic 'Compare Fraction' will be taught in many different curriculums but maybe in different grades ]
A Grade, say 5 will itself be a part of all Curriculums like IB,CBSE.
I need to store information such that for a Topic Compare Fraction, I can say:
It is taught in IB in grade 5
It is taught in CBSE in grade 4.
How can I set this up in Rails?
--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+unsubscribe@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/msg/rubyonrails-talk/-/3doEXjYfH7sJ.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home