I have a form_for that operates on the following action/object:
def new
@student = Students.new
end
In addition, the form is called from the following path
schools/4/students/new
What is the best way to save the id of the school (4 in this case) to the new student record in the db? I cannot pre-load he @student object with it, since it is lost on the next request. I have used hidden_field in the form, but there must be a better way in rails. Thank you.
studentscontroller:form: