I have a problem deciding the best way to manage a many_to_many
It define the relationships as so:
# student model
student has_many subjects :through => :enrollments
# subject model
subject has_many students :through => :enrollments
# enrollments model
How can I have a separate controller to manage a students enrollments
from one page? Imagine a student page with radio buttons defining
their relationship with a subject, something like [enrolled, deferred,
cancelled] for example. This would surely be a one_to_one relationship
from a routing perspective. My idea was to define this extra
controller but I'm quickly thinking I'm going the wrong way with this.
map.resources :student, :has_one => :curriculum, :except =>
Within the controller and the view, what would the form_for be for?
There is no curriculum model, and I can't have a form_for a
relationship (can I?).
Thanks in advance.