/association-through-example

has many through association with student teacher and subject example

Primary LanguageRuby

  1. In the students index.html, provide a link to add subject
    1. Pass student id as a parameter when calling new subject.
    2. In the subject controller, new method find the student id passed as a param from student index
    3. from here control is passed to subject form, in the form we must pass the student id as a hidden field to create method.

note : How student id is passed from student index to subject controller(new method) to subject form to subject controller(create method)